summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren gmail com>2007-04-11 17:15:54 +0000
committerElijah Newren <newren@src.gnome.org>2007-04-11 17:15:54 +0000
commit7626f74b8562ba8f1440f52ebf34f2f6131af545 (patch)
tree20eced591921fd02a9dc19c73ce876f71f592c36
parenteb639a46504c51e8f0f058c1fd23ea770fc65973 (diff)
downloadmetacity-7626f74b8562ba8f1440f52ebf34f2f6131af545.tar.gz
Advertise support of Above and Below operations (assuming the proposed
2007-04-11 Elijah Newren <newren gmail com> Advertise support of Above and Below operations (assuming the proposed EWMH additions of _NET_WM_ACTION_(ABOVE|BELOW) will be accepted, otherwise these changes will have to be modified). Part of #115247. * src/display.[ch] (meta_display_open, struct MetaDisplay): * src/screen.c (set_wm_check_hint): Add support for _NET_WM_ACTION_ABOVE and _NET_WM_ACTION_BELOW * src/window.c (set_allowed_actions_hints): add active_above and action_below svn path=/trunk/; revision=3190
-rw-r--r--ChangeLog14
-rw-r--r--src/display.c6
-rw-r--r--src/display.h2
-rw-r--r--src/screen.c4
-rw-r--r--src/window.c8
5 files changed, 31 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fce5c5a6..f6cad704 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-04-11 Elijah Newren <newren gmail com>
+
+ Advertise support of Above and Below operations (assuming the
+ proposed EWMH additions of _NET_WM_ACTION_(ABOVE|BELOW) will be
+ accepted, otherwise these changes will have to be modified). Part
+ of #115247.
+
+ * src/display.[ch] (meta_display_open, struct MetaDisplay):
+ * src/screen.c (set_wm_check_hint):
+ Add support for _NET_WM_ACTION_ABOVE and _NET_WM_ACTION_BELOW
+
+ * src/window.c (set_allowed_actions_hints):
+ add active_above and action_below
+
2007-04-10 Elijah Newren <newren gmail com>
* src/window.c (recalc_window_features): make sure to set
diff --git a/src/display.c b/src/display.c
index 16cea44b..637e60b9 100644
--- a/src/display.c
+++ b/src/display.c
@@ -334,7 +334,9 @@ meta_display_open (void)
"_METACITY_VERSION",
"_NET_WM_VISIBLE_NAME",
"_NET_WM_VISIBLE_ICON_NAME",
- "_NET_WM_USER_TIME_WINDOW"
+ "_NET_WM_USER_TIME_WINDOW",
+ "_NET_WM_ACTION_ABOVE",
+ "_NET_WM_ACTION_BELOW"
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@@ -494,6 +496,8 @@ meta_display_open (void)
display->atom_net_wm_visible_name = atoms[92];
display->atom_net_wm_visible_icon_name = atoms[93];
display->atom_net_wm_user_time_window = atoms[94];
+ display->atom_net_wm_action_above = atoms[95];
+ display->atom_net_wm_action_below = atoms[96];
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);
diff --git a/src/display.h b/src/display.h
index 59585f16..b934d718 100644
--- a/src/display.h
+++ b/src/display.h
@@ -159,6 +159,8 @@ struct _MetaDisplay
Atom atom_net_wm_action_maximize_vert;
Atom atom_net_wm_action_change_desktop;
Atom atom_net_wm_action_close;
+ Atom atom_net_wm_action_above;
+ Atom atom_net_wm_action_below;
Atom atom_net_wm_state_above;
Atom atom_net_wm_state_below;
Atom atom_net_startup_id;
diff --git a/src/screen.c b/src/screen.c
index ab470c94..6fbe8139 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -89,7 +89,7 @@ set_wm_check_hint (MetaScreen *screen)
static int
set_supported_hint (MetaScreen *screen)
{
-#define N_SUPPORTED 60
+#define N_SUPPORTED 62
Atom atoms[N_SUPPORTED];
atoms[0] = screen->display->atom_net_wm_name;
@@ -152,6 +152,8 @@ set_supported_hint (MetaScreen *screen)
atoms[57] = screen->display->atom_net_desktop_viewport;
atoms[58] = screen->display->atom_net_wm_user_time_window;
atoms[59] = screen->display->atom_net_moveresize_window;
+ atoms[60] = screen->display->atom_net_wm_action_above;
+ atoms[61] = screen->display->atom_net_wm_action_below;
/* atoms[58] = screen->display->atom_net_restack_window; */
diff --git a/src/window.c b/src/window.c
index 9aaa682d..78c6e992 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6035,7 +6035,7 @@ recalc_window_type (MetaWindow *window)
static void
set_allowed_actions_hint (MetaWindow *window)
{
-#define MAX_N_ACTIONS 10
+#define MAX_N_ACTIONS 12
unsigned long data[MAX_N_ACTIONS];
int i;
@@ -6081,6 +6081,12 @@ set_allowed_actions_hint (MetaWindow *window)
++i;
}
+ /* I guess we always allow above/below operations */
+ data[i] = window->display->atom_net_wm_action_above;
+ ++i;
+ data[i] = window->display->atom_net_wm_action_below;
+ ++i;
+
g_assert (i <= MAX_N_ACTIONS);
meta_verbose ("Setting _NET_WM_ALLOWED_ACTIONS with %d atoms\n", i);