Use XOR for toggling bits.  Mostly cosmetic.

Vadik.

-- 
When in doubt, be yourself.  And if that fails, su root.
Index: client.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/client.c,v
retrieving revision 1.214
diff -u -r1.214 client.c
--- client.c	12 Nov 2015 18:33:30 -0000	1.214
+++ client.c	6 Dec 2015 14:24:15 -0000
@@ -256,33 +256,21 @@
 	if (cc->flags & CLIENT_FULLSCREEN)
 		return;
 
-	if (cc->flags & CLIENT_FREEZE)
-		cc->flags &= ~CLIENT_FREEZE;
-	else
-		cc->flags |= CLIENT_FREEZE;
-
+	cc->flags ^= CLIENT_FREEZE;
 	xu_ewmh_set_net_wm_state(cc);
 }
 
 void
 client_toggle_hidden(struct client_ctx *cc)
 {
-	if (cc->flags & CLIENT_HIDDEN)
-		cc->flags &= ~CLIENT_HIDDEN;
-	else
-		cc->flags |= CLIENT_HIDDEN;
-
+	cc->flags ^= CLIENT_HIDDEN;
 	xu_ewmh_set_net_wm_state(cc);
 }
 
 void
 client_toggle_sticky(struct client_ctx *cc)
 {
-	if (cc->flags & CLIENT_STICKY)
-		cc->flags &= ~CLIENT_STICKY;
-	else
-		cc->flags |= CLIENT_STICKY;
-
+	cc->flags ^= CLIENT_STICKY;
 	xu_ewmh_set_net_wm_state(cc);
 }
 

Reply via email to