diff options
author | okan | 2016-09-02 15:08:44 +0000 |
---|---|---|
committer | okan | 2016-09-02 15:08:44 +0000 |
commit | 0e9032715d0166b07a4a5cf8c609c43a61a4fc40 (patch) | |
tree | 1e09ab288563e104d5d3c88a4a65cb0dc5a1f504 /client.c | |
parent | 8e2ecb0f528a4e9068243c7cb5b55d927ddc12f5 (diff) | |
download | cwm-0e9032715d0166b07a4a5cf8c609c43a61a4fc40.tar.gz |
Simplify toggling flags; from Vadim Vygonets.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 20 |
1 files changed, 4 insertions, 16 deletions
@@ -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); } |