]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
fix a crasher hopefully
[chaz/openbox] / openbox / event.c
index 93cdf0b220f3b89cd426e1bf276ce9ac13c90c1d..05024e72a9a59eaffc83debe8ef1461ebab86654 100644 (file)
@@ -321,6 +321,8 @@ static void event_client_dest(ObClient *client, gpointer data)
         focus_in = NULL;
     if (client == focus_out)
         focus_out = NULL;
+    if (client == focus_hilite)
+        focus_hilite = NULL;
 }
 
 static void event_done(gpointer data)
@@ -463,11 +465,9 @@ static void event_process(const XEvent *ec, gpointer data)
                     e->type == MotionNotify)
                     mouse_event(client, e);
                 else if (e->type == KeyPress)
-                    /* when in the middle of a focus cycling action, this
-                       causes the window which appears to be focused to be
-                       the one on which the actions will be executed */
-                    keyboard_event((focus_cycle_target ?
-                                    focus_cycle_target : client), e);
+                    keyboard_event((focus_cycle_target ? focus_cycle_target :
+                                    (focus_hilite ? focus_hilite : client)),
+                                   e);
             }
         }
     }
@@ -1199,6 +1199,11 @@ static void focus_delay_client_dest(ObClient *client, gpointer data)
     ob_main_loop_timeout_remove_data(ob_main_loop, focus_delay_func, client);
 }
 
+void event_halt_focus_delay()
+{
+    ob_main_loop_timeout_remove(ob_main_loop, focus_delay_func);
+}
+
 void event_ignore_queued_enters()
 {
     GSList *saved = NULL, *it;
This page took 0.020991 seconds and 4 git commands to generate.