/*
* ion/ioncore/ioncore.c
*
- * Copyright (c) Tuomo Valkonen 1999-2006.
+ * Copyright (c) Tuomo Valkonen 1999-2007.
*
* Ion is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by
static const char *progname="ion";
static const char ioncore_copy[]=
- "Ion " ION_VERSION ", copyright (c) Tuomo Valkonen 1999-2006.";
+ "Ion " ION_VERSION ", copyright (c) Tuomo Valkonen 1999-2007.";
static const char ioncore_license[]=DUMMY_TR(
"This program is free software; you can redistribute it and/or\n"
INIT_HOOK_(ioncore_deinit_hook);
INIT_HOOK_(screen_managed_changed_hook);
INIT_HOOK_(frame_managed_changed_hook);
- INIT_HOOK_(region_activated_hook);
- INIT_HOOK_(region_inactivated_hook);
INIT_HOOK_(clientwin_mapped_hook);
INIT_HOOK_(clientwin_unmapped_hook);
INIT_HOOK_(clientwin_property_change_hook);
- INIT_HOOK_(region_notify_hook);
+ INIT_HOOK(region_notify_hook, ioncore_frame_quasiactivation_notify);
INIT_HOOK(clientwin_do_manage_alt, clientwin_do_manage_default);
INIT_HOOK(ioncore_handle_event_alt, ioncore_handle_event);
INIT_HOOK(region_do_warp_alt, region_do_warp_default);
}
-static void init_global()
+#define INITSTR(NM) \
+ ioncore_g.notifies.NM=stringstore_alloc(#NM); \
+ if(ioncore_g.notifies.NM==STRINGID_NONE) return FALSE;
+
+static bool init_global()
{
/* argc, argv must be set be the program */
ioncore_g.dpy=NULL;
ioncore_g.frame_default_index=LLIST_INDEX_AFTER_CURRENT_ACT;
ioncore_g.framed_transients=TRUE;
+
+ INITSTR(activated);
+ INITSTR(inactivated);
+ INITSTR(activity);
+ INITSTR(sub_activity);
+ INITSTR(name);
+ INITSTR(unset_manager);
+ INITSTR(set_manager);
+ INITSTR(unset_return);
+ INITSTR(set_return);
+ INITSTR(pseudoactivated);
+ INITSTR(pseudoinactivated);
+ INITSTR(tag);
+ INITSTR(deinit);
+
+ return TRUE;
}
bool ioncore_init(const char *prog, int argc, char *argv[],
const char *localedir)
{
- init_global();
+ if(!init_global())
+ return FALSE;
progname=prog;
ioncore_g.argc=argc;
ioncore_init_session(XDisplayName(display));
for(i=drw; i<nrw; i++)
- ioncore_manage_rootwin(i, stflags&IONCORE_STARTUP_NOXINERAMA);
+ create_rootwin(i);
if(ioncore_g.rootwins==NULL){
if(nrw-drw>1)