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@gmail.com>
Sat, 11 Oct 2014 00:17:20 +0000 (02:17 +0200)
obt/prop.c
obt/prop.h
openbox/event.c
openbox/screen.c

index 0cecccf..893d199 100644 (file)
@@ -187,6 +187,7 @@ void obt_prop_startup(void)
 */
 
     CREATE_(OPENBOX_PID);
+    CREATE_(OB_FOCUS);
     CREATE_(OB_THEME);
     CREATE_(OB_CONFIG_FILE);
     CREATE_(OB_WM_ACTION_UNDECORATE);
index acb5c95..79e3380 100644 (file)
@@ -208,6 +208,7 @@ typedef enum {
 
     /* Openbox specific atoms */
 
+    OBT_PROP_OB_FOCUS,
     OBT_PROP_OB_WM_ACTION_UNDECORATE,
     OBT_PROP_OB_WM_STATE_UNDECORATED,
     OBT_PROP_OPENBOX_PID, /* this is depreecated in favour of ob_control */
index 243f207..16bc56b 100644 (file)
@@ -1467,6 +1467,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
                So we are left just assuming all activations are from the user.
             */
             client_activate(client, FALSE, FALSE, TRUE, TRUE, TRUE);
+        } else if (msgtype == OBT_PROP_ATOM(OB_FOCUS)) {
+            client_focus(client);
         } else if (msgtype == OBT_PROP_ATOM(NET_WM_MOVERESIZE)) {
             ob_debug("net_wm_moveresize for 0x%lx direction %d",
                      client->window, e->xclient.data.l[2]);
index 2eebf18..84c9154 100644 (file)
@@ -294,6 +294,7 @@ gboolean screen_annex(void)
     supported[i++] = OBT_PROP_ATOM(KDE_NET_WM_FRAME_STRUT);
     supported[i++] = OBT_PROP_ATOM(KDE_NET_WM_WINDOW_TYPE_OVERRIDE);
 
+    supported[i++] = OBT_PROP_ATOM(OB_FOCUS);
     supported[i++] = OBT_PROP_ATOM(OB_WM_ACTION_UNDECORATE);
     supported[i++] = OBT_PROP_ATOM(OB_WM_STATE_UNDECORATED);
     supported[i++] = OBT_PROP_ATOM(OPENBOX_PID);