summaryrefslogtreecommitdiff
path: root/src/netwm.c
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2012-01-08 12:16:07 +0100
committerOlivier Fourdan <fourdan@xfce.org>2012-01-08 15:13:44 +0100
commita1253635f26c0bc9ae855c71ff945b3139fb7333 (patch)
treee6f2ec2e7f4cd6b916421bee300df146969e6b59 /src/netwm.c
parentab54b1d7322adaac89b4218e52912d75dc395747 (diff)
downloadxfwm4-a1253635f26c0bc9ae855c71ff945b3139fb7333.tar.gz
Workaround Adobe AIR setting workspace to 0xFF instead of 0xFFFFFFFF for all workspaces as per EWMH specifications (Bug #8304)
Diffstat (limited to 'src/netwm.c')
-rw-r--r--src/netwm.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/netwm.c b/src/netwm.c
index 188647486..545e64a32 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -271,6 +271,43 @@ clientGetNetState (Client * c)
}
void
+clientUpdateNetWmDesktop (Client * c, XClientMessageEvent * ev)
+{
+ ScreenInfo *screen_info;
+
+ g_return_if_fail (c != NULL);
+ TRACE ("entering clientUpdateNetWmDesktop");
+ TRACE ("client \"%s\" (0x%lx), value 0x%lx", c->name, c->window, ev->data.l[0]);
+
+ screen_info = c->screen_info;
+
+ if ((guint) ev->data.l[0] == ALL_WORKSPACES)
+ {
+ if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK) && !FLAG_TEST (c->flags, CLIENT_FLAG_STICKY))
+ {
+ clientStick (c, TRUE);
+ frameQueueDraw (c, FALSE);
+ }
+ }
+ else if ((guint) ev->data.l[0] < (guint) screen_info->workspace_count)
+ {
+ if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK) && FLAG_TEST (c->flags, CLIENT_FLAG_STICKY))
+ {
+ clientUnstick (c, TRUE);
+ frameQueueDraw (c, FALSE);
+ }
+ if ((guint) ev->data.l[0] != (guint) c->win_workspace)
+ {
+ clientSetWorkspace (c, (guint) ev->data.l[0], TRUE);
+ }
+ }
+ else
+ {
+ TRACE ("Ignoring invalid NET_WM_DESKTOP value 0x%lx specified for client \"%s\" (0x%lx)", ev->data.l[0], c->name, c->window);
+ }
+}
+
+void
clientUpdateNetState (Client * c, XClientMessageEvent * ev)
{
ScreenInfo *screen_info;