aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2014-01-28 13:40:40 +0000
committerokan2014-01-28 13:40:40 +0000
commit21714a7f2eed869303044cb99686fe0f0a38267a (patch)
tree974ba37d688aab9ae6ae1464c9e1004d94516eca /xevents.c
parent6bb22ee14e5ed7514df17cbc7d8f28f6c7c66d47 (diff)
downloadcwm-21714a7f2eed869303044cb99686fe0f0a38267a.tar.gz
The EWMH spec states that if the cardinal returned is 0xFFFFFFFF (-1)
then the window should appear on all desktops, which in our case is assigned to group 0. Found to fix stalonetray due to the non-ewmh aware range checking in group_movetogroup(); from Thomas Adam.
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/xevents.c b/xevents.c
index 58a2a9c..834a5ea 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xevents.c,v 1.106 2014/01/22 21:48:27 okan Exp $
+ * $OpenBSD: xevents.c,v 1.107 2014/01/28 13:40:40 okan Exp $
*/
/*
@@ -346,8 +346,17 @@ xev_handle_clientmessage(XEvent *ee)
client_ptrwarp(cc);
}
- if (e->message_type == ewmh[_NET_WM_DESKTOP] && e->format == 32)
- group_movetogroup(cc, e->data.l[0]);
+ if (e->message_type == ewmh[_NET_WM_DESKTOP] && e->format == 32) {
+ /*
+ * The EWMH spec states that if the cardinal returned is
+ * 0xFFFFFFFF (-1) then the window should appear on all
+ * desktops, which in our case is assigned to group 0.
+ */
+ if (e->data.l[0] == (unsigned long)-1)
+ group_movetogroup(cc, 0);
+ else
+ group_movetogroup(cc, e->data.l[0]);
+ }
if (e->message_type == ewmh[_NET_WM_STATE] && e->format == 32)
xu_ewmh_handle_net_wm_state_msg(cc,