summaryrefslogtreecommitdiff
path: root/app/cwm/client.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2016-09-02 15:08:45 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2016-09-02 15:08:45 +0000
commit72276a1d916fe7d78f6a44d4c4444a1dd4e6a294 (patch)
tree4c8cbbb4e26054974e9b9ad1dfe484071cdc6201 /app/cwm/client.c
parentcc3915b653d09d33fde4391a953c1fe393e52038 (diff)
Simplify toggling flags; from Vadim Vygonets.
Diffstat (limited to 'app/cwm/client.c')
-rw-r--r--app/cwm/client.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index 0efd4b1d8..f7808890d 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.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: client.c,v 1.216 2016/09/01 18:38:52 okan Exp $
+ * $OpenBSD: client.c,v 1.217 2016/09/02 15:08:44 okan Exp $
*/
#include <sys/types.h>
@@ -256,33 +256,21 @@ client_toggle_freeze(struct client_ctx *cc)
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);
}