diff options
author | okan | 2017-12-22 21:21:44 +0000 |
---|---|---|
committer | okan | 2017-12-22 21:21:44 +0000 |
commit | 456e85bd7fa9cca94b23f98acd6f612cc15ee5e0 (patch) | |
tree | 7afc953095ff27cc0904bfb36d5e4ac2487abeaf /client.c | |
parent | 8ce5d4396dec452d2c0af1eefc88ebcc47f47832 (diff) | |
download | cwm-456e85bd7fa9cca94b23f98acd6f612cc15ee5e0.tar.gz |
Fix a few comments and while here, wrap some long lines.
Diffstat (limited to '')
-rw-r--r-- | client.c | 28 |
1 files changed, 11 insertions, 17 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.241 2017/12/19 14:30:53 okan Exp $ + * $OpenBSD: client.c,v 1.242 2017/12/22 21:21:44 okan Exp $ */ #include <sys/types.h> @@ -104,8 +104,8 @@ client_init(Window win, struct screen_ctx *sc, int active) if ((cc->wmh) && (cc->wmh->flags & StateHint)) client_set_wm_state(cc, cc->wmh->initial_state); } else { - if ((active == 0) && (XQueryPointer(X_Dpy, cc->win, &rwin, &cwin, - &x, &y, &wx, &wy, &mask)) && (cwin != None)) + if ((active == 0) && (XQueryPointer(X_Dpy, cc->win, &rwin, + &cwin, &x, &y, &wx, &wy, &mask)) && (cwin != None)) active = 1; } @@ -222,7 +222,7 @@ client_setactive(struct client_ctx *cc) client_draw_border(oldcc); } - /* If we're in the middle of cycing, don't change the order. */ + /* If we're in the middle of cycling, don't change the order. */ if (!sc->cycling) client_mtf(cc); @@ -344,11 +344,6 @@ client_toggle_maximize(struct client_ctx *cc) cc->savegeom.x = cc->geom.x; } - /* - * pick screen that the middle of the window is on. - * that's probably more fair than if just the origin of - * a window is poking over a boundary - */ area = screen_area(sc, cc->geom.x + cc->geom.w / 2, cc->geom.y + cc->geom.h / 2, CWM_GAP); @@ -658,7 +653,6 @@ client_setname(struct client_ctx *cc) wn = xmalloc(sizeof(*wn)); wn->name = newname; TAILQ_INSERT_TAIL(&cc->nameq, wn, entry); - match: cc->name = wn->name; @@ -702,21 +696,20 @@ client_cycle(struct screen_ctx *sc, int flags) client_next(newcc); /* Only cycle visible and non-ignored windows. */ - if ((newcc->flags & (CLIENT_SKIP_CYCLE)) - || ((flags & CWM_CYCLE_INGROUP) && - (newcc->gc != oldcc->gc))) + if ((newcc->flags & (CLIENT_SKIP_CYCLE)) || + ((flags & CWM_CYCLE_INGROUP) && + (newcc->gc != oldcc->gc))) again = 1; /* Is oldcc the only non-hidden window? */ if (newcc == oldcc) { if (again) return; /* No windows visible. */ - break; } } - /* reset when cycling mod is released. XXX I hate this hack */ + /* Reset when cycling mod is released. XXX I hate this hack */ sc->cycling = 1; client_ptrsave(oldcc); client_raise(prevcc); @@ -924,8 +917,9 @@ client_mwm_hints(struct client_ctx *cc) { struct mwm_hints *mwmh; - if (xu_getprop(cc->win, cwmh[_MOTIF_WM_HINTS], cwmh[_MOTIF_WM_HINTS], - MWM_HINTS_ELEMENTS, (unsigned char **)&mwmh) == MWM_HINTS_ELEMENTS) { + if (xu_getprop(cc->win, cwmh[_MOTIF_WM_HINTS], + cwmh[_MOTIF_WM_HINTS], MWM_HINTS_ELEMENTS, + (unsigned char **)&mwmh) == MWM_HINTS_ELEMENTS) { if (mwmh->flags & MWM_FLAGS_DECORATIONS && !(mwmh->decorations & MWM_DECOR_ALL) && !(mwmh->decorations & MWM_DECOR_BORDER)) |