]> Dogcows Code - chaz/openbox/commitdiff
cancel focus delays when the user runs a focus (or focus cycle) action, and when...
authorDana Jansens <danakj@orodu.net>
Thu, 9 Oct 2003 18:49:14 +0000 (18:49 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 9 Oct 2003 18:49:14 +0000 (18:49 +0000)
openbox/action.c
openbox/client.c

index 5cce18a370e54f1c3934cb0e548f02bc7e9c7a7f..bac087876e9571748b8be8572b04946cdb0d063b 100644 (file)
@@ -994,6 +994,10 @@ void action_activate(union ActionData *data)
 
 void action_focus(union ActionData *data)
 {
+    /* if using focus_delay, stop the timer now so that focus doesn't go moving
+       on us */
+    event_halt_focus_delay();
+
     client_focus(data->client.any.c);
 }
 
@@ -1380,6 +1384,10 @@ void action_showmenu(union ActionData *data)
 
 void action_cycle_windows(union ActionData *data)
 {
+    /* if using focus_delay, stop the timer now so that focus doesn't go moving
+       on us */
+    event_halt_focus_delay();
+
     focus_cycle(data->cycle.forward, data->cycle.linear,
                 data->cycle.dialog,
                 data->cycle.inter.final, data->cycle.inter.cancel);
@@ -1387,6 +1395,10 @@ void action_cycle_windows(union ActionData *data)
 
 void action_directional_focus(union ActionData *data)
 {
+    /* if using focus_delay, stop the timer now so that focus doesn't go moving
+       on us */
+    event_halt_focus_delay();
+
     focus_directional_cycle(data->interdiraction.direction,
                             data->interdiraction.dialog,
                             data->interdiraction.inter.final,
index b562283bac6b964fb637cf944bfc78cb5ec5b7ee..feaa24df9f3e1400e48fd042cee5d9b87f0d9022 100644 (file)
@@ -359,7 +359,13 @@ void client_manage(Window window)
        a window maps since its not based on an action from the user like
        clicking a window to activate is. so keep the new window out of the way
        but do focus it. */
-    if (activate) client_focus(self);
+    if (activate) {
+        /* if using focus_delay, stop the timer now so that focus doesn't go
+           moving on us */
+        event_halt_focus_delay();
+
+        client_focus(self);
+    }
 
     /* client_activate does this but we aret using it so we have to do it
        here as well */
This page took 0.02821 seconds and 4 git commands to generate.