diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2014-09-10 20:30:39 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2014-09-10 20:30:39 +0000 |
commit | 27774f7bafd0e293128014fcb66af2115c6af313 (patch) | |
tree | 868de77e49a17b75ce98127c6fcf1136c890d490 /app | |
parent | 90f4282a0fabfa5de57908a0f9bc65b4c0a1a443 (diff) |
fold in 'active' into 'flags'
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/calmwm.h | 4 | ||||
-rw-r--r-- | app/cwm/client.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h index f00c04f18..8e83e2fbc 100644 --- a/app/cwm/calmwm.h +++ b/app/cwm/calmwm.h @@ -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: calmwm.h,v 1.274 2014/09/08 21:15:14 okan Exp $ + * $OpenBSD: calmwm.h,v 1.275 2014/09/10 20:30:38 okan Exp $ */ #ifndef _CALMWM_H_ @@ -180,12 +180,12 @@ struct client_ctx { #define CLIENT_URGENCY 0x0400 #define CLIENT_FULLSCREEN 0x0800 #define CLIENT_STICKY 0x1000 +#define CLIENT_ACTIVE 0x2000 #define CLIENT_HIGHLIGHT (CLIENT_GROUP | CLIENT_UNGROUP) #define CLIENT_MAXFLAGS (CLIENT_VMAXIMIZED | CLIENT_HMAXIMIZED) #define CLIENT_MAXIMIZED (CLIENT_VMAXIMIZED | CLIENT_HMAXIMIZED) int flags; - int active; int stackingorder; struct winname_q nameq; #define CLIENT_MAXNAMEQLEN 5 diff --git a/app/cwm/client.c b/app/cwm/client.c index 64c8d08ec..1f5c0b61c 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.181 2014/09/08 21:24:27 okan Exp $ + * $OpenBSD: client.c,v 1.182 2014/09/10 20:30:38 okan Exp $ */ #include <sys/param.h> @@ -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; |