Add a _OB_FOCUS client message for obpanel to use.
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:52:48 +0000 (01:52 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 26 Jul 2007 19:11:10 +0000 (21:11 +0200)
openbox/event.c
openbox/prop.c
openbox/prop.h

index f0036590871d742008c62d20a4d15950e472e423..8bc9fc20d334a7655002cbb430f7cbea89ec2b2e 100644 (file)
@@ -1305,6 +1305,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
             client_activate(client, FALSE, TRUE, TRUE,
                             (e->xclient.data.l[0] == 0 ||
                              e->xclient.data.l[0] == 2));
+        } else if (msgtype == prop_atoms.ob_focus) {
+            client_focus(client);
         } else if (msgtype == prop_atoms.net_wm_moveresize) {
             ob_debug("net_wm_moveresize for 0x%lx direction %d\n",
                      client->window, e->xclient.data.l[2]);
index 46d688c828dcea45235459004164c268e724ce2e..fb0b916b97e90ee8c8caf722bf9ef9ddbae96eb5 100644 (file)
@@ -171,6 +171,7 @@ void prop_startup()
 */
 
     CREATE(openbox_pid, "_OPENBOX_PID");
+    CREATE(ob_focus, "_OB_FOCUS");
     CREATE(ob_theme, "_OB_THEME");
     CREATE(ob_wm_action_undecorate, "_OB_WM_ACTION_UNDECORATE");
     CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED");
index 914c1f61fc7e6e03c894a47df34de42111c77af9..5fb0e16109297a41bd1de13898840b8dec7034cd 100644 (file)
@@ -190,6 +190,7 @@ typedef struct Atoms {
 
     /* Openbox specific atoms */
 
+    Atom ob_focus;
     Atom ob_wm_action_undecorate;
     Atom ob_wm_state_undecorated;
     Atom openbox_pid; /* this is depreecated in favour of ob_control */