summary refs log tree commit diff
path: root/xutil.c
diff options
context:
space:
mode:
authorokan <okan>2014-08-22 19:04:00 +0000
committerokan <okan>2014-08-22 19:04:00 +0000
commitfe533fdc8edb2584b40a8bad9f00b8258529854f (patch)
treea25ef79ccd5141c92bc3bc4915885c81f6afc0f3 /xutil.c
parentb31b09dfc26b4b17c025d7196b8b5a4a26f599df (diff)
downloadcwm-fe533fdc8edb2584b40a8bad9f00b8258529854f.tar.gz
cwm-fe533fdc8edb2584b40a8bad9f00b8258529854f.tar.xz
cwm-fe533fdc8edb2584b40a8bad9f00b8258529854f.zip
Fix nogroup regression, where nogroup became an actual group - the
symantics between cwm groups and ewmh got in the way.  Ensure a client
that wants to be in nogroup stays in nogroup (thus stays in view), even
when (re)reading NET_WM_DESKTOP.  Paritially reverts patchset 644
(2014-02-07 13:09 PST) which deals with a NULL cc->group.  All to be
revisited when NET_WM_STATE_STICKY hits cwm.

Reported by many; testing and ok phessler.
Diffstat (limited to 'xutil.c')
-rw-r--r--xutil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xutil.c b/xutil.c
index 3c4d004..847b148 100644
--- a/xutil.c
+++ b/xutil.c
@@ -291,7 +291,10 @@ xu_ewmh_net_desktop_names(struct screen_ctx *sc, char *data, int n)
 void
 xu_ewmh_net_wm_desktop(struct client_ctx *cc)
 {
-	long	 num = cc->group->num;
+	long	 num = 0xffffffff;
+
+	if (cc->group)
+		num = cc->group->num;
 
 	XChangeProperty(X_Dpy, cc->win, ewmh[_NET_WM_DESKTOP],
 	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&num, 1);