Add a _OB_FOCUS client message for obpanel to use.
authorMikael Magnusson <mikachu@comhem.se>
Wed, 22 Aug 2007 21:58:57 +0000 (23:58 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Wed, 16 Jan 2008 06:26:34 +0000 (07:26 +0100)
openbox/event.c
openbox/prop.c
openbox/prop.h
openbox/screen.c

index a5936acda81327a76e674c87f839a8e372ddf2fd..4c68377b4c588c31b7162932456e93ff9bbeb833 100644 (file)
@@ -1295,6 +1295,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 40ae6ef299b5d6af4272fe0b85adf7e40c774cbf..bfa2c4452c8052ec5918ae377c6ef3ef5485844f 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 f0c4f5e98e1ddeff67179a0a10f22049bf408848..11c54c46197edb3516c9c6d88bff2271c1250942 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 */
index fadca63f43c0fa8ffa294be9f1e031ee3fa285a9..4fb0e1406081664c6f6e6907acab691e09cdaeae 100644 (file)
@@ -288,6 +288,7 @@ gboolean screen_annex()
     supported[i++] = prop_atoms.kde_net_wm_frame_strut;
     supported[i++] = prop_atoms.kde_net_wm_window_type_override;
 
+    supported[i++] = prop_atoms.ob_focus;
     supported[i++] = prop_atoms.ob_wm_action_undecorate;
     supported[i++] = prop_atoms.ob_wm_state_undecorated;
     supported[i++] = prop_atoms.openbox_pid;