From 35e6d634ac0dcf08d9b4ae737ee7b053e316298a Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 10 Sep 2014 20:30:38 +0000 Subject: fold in 'active' into 'flags' --- client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 64c8d08..1f5c0b6 100644 --- a/client.c +++ b/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.181 2014/09/08 21:24:27 okan Exp $ + * $OpenBSD: client.c,v 1.182 2014/09/10 20:30:38 okan Exp $ */ #include @@ -195,7 +195,7 @@ client_setactive(struct client_ctx *cc) client_msg(cc, cwmh[WM_TAKE_FOCUS], Last_Event_Time); if ((oldcc = client_current())) { - oldcc->active = 0; + oldcc->flags &= ~CLIENT_ACTIVE; client_draw_border(oldcc); } @@ -204,7 +204,7 @@ client_setactive(struct client_ctx *cc) client_mtf(cc); curcc = cc; - cc->active = 1; + cc->flags |= CLIENT_ACTIVE; cc->flags &= ~CLIENT_URGENCY; client_draw_border(cc); conf_grab_mouse(cc->win); @@ -485,7 +485,7 @@ client_hide(struct client_ctx *cc) XUnmapWindow(X_Dpy, cc->win); - cc->active = 0; + cc->flags &= ~CLIENT_ACTIVE; cc->flags |= CLIENT_HIDDEN; client_set_wm_state(cc, IconicState); @@ -509,7 +509,7 @@ client_unhide(struct client_ctx *cc) void client_urgency(struct client_ctx *cc) { - if (!cc->active) + if (!(cc->flags & CLIENT_ACTIVE)) cc->flags |= CLIENT_URGENCY; } @@ -519,7 +519,7 @@ client_draw_border(struct client_ctx *cc) struct screen_ctx *sc = cc->sc; unsigned long pixel; - if (cc->active) + if (cc->flags & CLIENT_ACTIVE) switch (cc->flags & CLIENT_HIGHLIGHT) { case CLIENT_GROUP: pixel = sc->xftcolor[CWM_COLOR_BORDER_GROUP].pixel; -- cgit v1.2.3-2-gb3c3