]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/ioncore.c
[svn-upgrade] Integrating new upstream version, ion3 (20070318)
[ion3.git] / ioncore / ioncore.c
index 62f616b985135b5ccbc94fc2483fccf70cfd7ba6..49da6c715f4dc04d7f3c80fd8e1a416c31bfff41 100644 (file)
@@ -56,6 +56,9 @@
 #include "group-cw.h"
 #include "group-ws.h"
 #include "llist.h"
+#include "exec.h"
+#include "screen-notify.h"
+
 
 #include "../version.h"
 #include "exports.h"
@@ -97,7 +100,7 @@ WHook *ioncore_deinit_hook=NULL;
 
 void ioncore_warn_nolog(const char *str)
 {
-    fprintf(stderr, "%s: %s\n", prog_execname(), str);
+    fprintf(stderr, "%s: %s\n", libtu_progname(), str);
 }
 
 
@@ -253,12 +256,12 @@ static bool init_messages(const char *localedir)
 
 #define INIT_HOOK_(NM)                             \
     NM=mainloop_register_hook(#NM, create_hook()); \
-    if(NM==NULL) return FALSE;
+    if(NM==NULL) return FALSE
 
-#define INIT_HOOK(NM, DFLT)                           \
-    INIT_HOOK_(NM)                                    \
-    if(!hook_add(NM, (void (*)())DFLT)) return FALSE;
+#define ADD_HOOK_(NM, FN)                          \
+    if(!hook_add(NM, (void (*)())FN)) return FALSE
 
+#define INIT_HOOK(NM, DFLT) INIT_HOOK_(NM); ADD_HOOK_(NM, DFLT)
 
 static bool init_hooks()
 {
@@ -271,11 +274,15 @@ static bool init_hooks()
     INIT_HOOK_(clientwin_unmapped_hook);
     INIT_HOOK_(clientwin_property_change_hook);
     
-    INIT_HOOK(region_notify_hook, ioncore_frame_quasiactivation_notify);
+    INIT_HOOK_(region_notify_hook);
+    ADD_HOOK_(region_notify_hook, ioncore_frame_quasiactivation_notify);
+    ADD_HOOK_(region_notify_hook, ioncore_screen_activity_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);
-
+    INIT_HOOK(ioncore_exec_environ_hook, ioncore_setup_environ);
+    
     mainloop_sigchld_hook=mainloop_register_hook("ioncore_sigchld_hook",
                                                  create_hook());
     mainloop_sigusr2_hook=mainloop_register_hook("ioncore_sigusr2_hook",
@@ -321,6 +328,7 @@ static bool init_global()
     ioncore_g.screens=NULL;
     ioncore_g.focus_next=NULL;
     ioncore_g.warp_next=FALSE;
+    ioncore_g.focus_next_source=IONCORE_FOCUSNEXT_OTHER;
     
     ioncore_g.focus_current=NULL;
 
@@ -330,6 +338,9 @@ static bool init_global()
     ioncore_g.opaque_resize=0;
     ioncore_g.warp_enabled=TRUE;
     ioncore_g.switchto_new=TRUE;
+    ioncore_g.no_mousefocus=FALSE;
+    ioncore_g.unsqueeze_enabled=TRUE;
+    ioncore_g.autoraise=TRUE;
     
     ioncore_g.enc_utf8=FALSE;
     ioncore_g.enc_sb=TRUE;
@@ -354,6 +365,8 @@ static bool init_global()
     INITSTR(pseudoinactivated);
     INITSTR(tag);
     INITSTR(deinit);
+    INITSTR(map);
+    INITSTR(unmap);
     
     return TRUE;
 }