From 9d7711e4336378171d6f841523e91c2f0e1276cc Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 24 Jul 2007 01:52:48 +0200 Subject: [PATCH] Add a _OB_FOCUS client message for obpanel to use. --- openbox/event.c | 2 ++ openbox/prop.c | 1 + openbox/prop.h | 1 + 3 files changed, 4 insertions(+) diff --git a/openbox/event.c b/openbox/event.c index a5936acd..4c68377b 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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]); diff --git a/openbox/prop.c b/openbox/prop.c index 40ae6ef2..bfa2c445 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -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"); diff --git a/openbox/prop.h b/openbox/prop.h index f0c4f5e9..11c54c46 100644 --- a/openbox/prop.h +++ b/openbox/prop.h @@ -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 */ -- 2.34.1