]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/ioncore.c
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / ioncore / ioncore.c
index 5c88803f8d2358f59cb3ea38e55387aa79fce45e..62f616b985135b5ccbc94fc2483fccf70cfd7ba6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
@@ -69,7 +69,7 @@ WGlobal ioncore_g;
 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"
@@ -267,13 +267,11 @@ static bool init_hooks()
     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);
@@ -308,7 +306,11 @@ static bool register_classes()
 }
 
 
-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;
@@ -338,13 +340,30 @@ static void init_global()
     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;
@@ -483,7 +502,7 @@ static bool ioncore_init_x(const char *display, int stflags)
     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)