From 382d37553d9dc7679464cf71aecf8590cc06a2cb Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 17 May 2007 04:15:34 +0000 Subject: [PATCH] add an atom ob_wm_action_undecorate to match with ob_wm_state_undecorated, so stuff could know if the window can be undecorated --- openbox/client.c | 4 +++- openbox/prop.c | 1 + openbox/prop.h | 1 + openbox/screen.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/openbox/client.c b/openbox/client.c index addaed44..b0482faa 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1721,7 +1721,7 @@ void client_setup_decor_and_functions(ObClient *self) static void client_change_allowed_actions(ObClient *self) { - gulong actions[11]; + gulong actions[12]; gint num = 0; /* desktop windows are kept on all desktops */ @@ -1748,6 +1748,8 @@ static void client_change_allowed_actions(ObClient *self) actions[num++] = prop_atoms.net_wm_action_above; if (self->functions & OB_CLIENT_FUNC_BELOW) actions[num++] = prop_atoms.net_wm_action_below; + if (self->functions & OB_CLIENT_FUNC_UNDECORATE) + actions[num++] = prop_atoms.ob_wm_action_undecorate; PROP_SETA32(self->window, net_wm_allowed_actions, atom, actions, num); diff --git a/openbox/prop.c b/openbox/prop.c index 36e52017..d3f39e63 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -172,6 +172,7 @@ void prop_startup() CREATE(openbox_pid, "_OPENBOX_PID"); CREATE(ob_config, "_OB_CONFIG"); + CREATE(ob_wm_action_undecorate, "_OB_WM_ACTION_UNDECORATED"); CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED"); CREATE(ob_control, "_OB_CONTROL"); } diff --git a/openbox/prop.h b/openbox/prop.h index 35eb1979..3f18a363 100644 --- a/openbox/prop.h +++ b/openbox/prop.h @@ -190,6 +190,7 @@ typedef struct Atoms { /* Openbox specific atoms */ + Atom ob_wm_action_undecorate; Atom ob_wm_state_undecorated; Atom openbox_pid; /* this is depreecated in favour of ob_control */ Atom ob_config; diff --git a/openbox/screen.c b/openbox/screen.c index 45246297..a72bd7e5 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -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_wm_action_undecorate; supported[i++] = prop_atoms.ob_wm_state_undecorated; supported[i++] = prop_atoms.openbox_pid; supported[i++] = prop_atoms.ob_config; -- 2.39.2