summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorokan <okan>2022-02-26 15:03:42 +0000
committerokan <okan>2022-02-26 15:03:42 +0000
commit5e5221d82d1d0c8679329e5bfb5a913e1b543a29 (patch)
treea849ab33c4de701a9b9bfc3ab1006048b9b5abe1 /client.c
parent7c22b36a230ea740a0fe2b9d089f3b3340dc182b (diff)
downloadcwm-5e5221d82d1d0c8679329e5bfb5a913e1b543a29.tar.gz
cwm-5e5221d82d1d0c8679329e5bfb5a913e1b543a29.tar.xz
cwm-5e5221d82d1d0c8679329e5bfb5a913e1b543a29.zip
Fix spelling of some unused MWM hints; from Sean C. Farley.
While here, flesh out the rest of the MWM hints.
Diffstat (limited to 'client.c')
-rw-r--r--client.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/client.c b/client.c
index 0d93714..e66ca28 100644
--- a/client.c
+++ b/client.c
@@ -849,13 +849,15 @@ client_mwm_hints(struct client_ctx *cc)
 
 	if (xu_get_prop(cc->win, cwmh[_MOTIF_WM_HINTS],
 	    cwmh[_MOTIF_WM_HINTS], MWM_HINTS_ELEMENTS,
-	    (unsigned char **)&mwmh) == MWM_HINTS_ELEMENTS) {
-		if (mwmh->flags & MWM_FLAGS_DECORATIONS &&
-		    !(mwmh->decorations & MWM_DECOR_ALL) &&
-		    !(mwmh->decorations & MWM_DECOR_BORDER))
+	    (unsigned char **)&mwmh) <= 0)
+		return;
+
+	if ((mwmh->flags & MWM_HINTS_DECORATIONS) &&
+	    !(mwmh->decorations & MWM_DECOR_ALL)) {
+		if (!(mwmh->decorations & MWM_DECOR_BORDER))
 			cc->bwidth = 0;
-		XFree(mwmh);
 	}
+	XFree(mwmh);
 }
 
 void