]> Dogcows Code - chaz/openbox/commitdiff
use a client destructor to watch for focus_in/out becoming invalid
authorDana Jansens <danakj@orodu.net>
Mon, 29 Sep 2003 16:32:53 +0000 (16:32 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 29 Sep 2003 16:32:53 +0000 (16:32 +0000)
openbox/event.c

index 8a9b83beaf2bd62ea0933bf01fa42b4ba6a88481..f68517d1f6e4ada500d439b6b2dc243c111ae6b7 100644 (file)
@@ -57,6 +57,7 @@
 
 static void event_process(const XEvent *e, gpointer data);
 static void event_done(gpointer data);
+static void event_client_dest(ObClient *client, gpointer data);
 static void event_handle_root(XEvent *e);
 static void event_handle_menu(XEvent *e);
 static void event_handle_dock(ObDock *s, XEvent *e);
@@ -148,6 +149,7 @@ void event_startup(gboolean reconfig)
 #endif
 
     client_add_destructor(focus_delay_client_dest, NULL);
+    client_add_destructor(event_client_dest, NULL);
 }
 
 void event_shutdown(gboolean reconfig)
@@ -313,6 +315,14 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
     return FALSE;
 }
 
+static void event_client_dest(ObClient *client, gpointer data)
+{
+    if (client == focus_in)
+        focus_in = NULL;
+    if (client == focus_out)
+        focus_out = NULL;
+}
+
 static void event_done(gpointer data)
 {
     static ObClient *last = NULL;
This page took 0.026858 seconds and 4 git commands to generate.