]> Dogcows Code - chaz/openbox/commitdiff
update focus_hilite appropriately for when changing desktops
authorDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 05:44:16 +0000 (05:44 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 05:44:16 +0000 (05:44 +0000)
openbox/event.c
openbox/focus.h

index cfc823b2e78c9b2514937d59c556837cf7992f39..5d19e897d581cdc68cf84398385e5af14082d1d6 100644 (file)
@@ -452,6 +452,7 @@ static void event_process(const XEvent *ec, gpointer data)
             ob_debug("UNKNOWN FOCUS %s (d %d, m %d) window 0x%x\n",
                      (e->type == FocusIn ? "IN" : "OUT"),
                      detail, mode, window);
+    }
 #endif
 
     event_set_lasttime(e);
@@ -523,10 +524,11 @@ static void event_process(const XEvent *ec, gpointer data)
                 if (e->type == ButtonPress || e->type == ButtonRelease ||
                     e->type == MotionNotify)
                     mouse_event(client, e);
-                else if (e->type == KeyPress)
+                else if (e->type == KeyPress) {
                     keyboard_event((focus_cycle_target ? focus_cycle_target :
                                     (focus_hilite ? focus_hilite : client)),
                                    e);
+                }
             }
         }
     }
@@ -678,6 +680,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         }
 
         /* This client is no longer focused, so show that */
+        focus_hilite = NULL;
         frame_adjust_focus(client->frame, FALSE);
         client_calc_layer(client);
         break;
index ab13fc5e04633e27752d8a460c694bfd74b558d5..81cd5ffef92c82d1d75d3b351a41f0432cf51ac6 100644 (file)
@@ -30,7 +30,11 @@ struct _ObClient;
 /*! The client which is currently focused */
 extern struct _ObClient *focus_client;
 /*! The client which is being decorated as focused, not always matching the
-  real focus, but this is used to track it so that it can be resolved to match
+  real focus, but this is used to track it so that it can be resolved to match.
+
+  This is for when you change desktops. We know which window is *going to be*
+  focused, so we hilight it. But since it's hilighted, we also want
+  keybindings to go to it, which is really what this is for.
 */
 extern struct _ObClient *focus_hilite;
 /*! The client which appears focused during a focus cycle operation */
This page took 0.02756 seconds and 4 git commands to generate.