X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=1c835f827441b5076e3952fc641a39154734d299;hb=98582a35ee81c00b65d0b62d94ddde5cada1de92;hp=f86518307935be30cd56ca6aedcab55de20ecb52;hpb=8b4eb944cf0e4af9488bc51d71c40c1fdc2f90c1;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index f865183..1c835f8 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1283,7 +1283,9 @@ switchws(struct swm_region *r, union arg *args) */ if (new_ws->old_r == this_r) TAILQ_FOREACH(win, &new_ws->winlist, entry) - XMapRaised(display, win->id); + if (!(win->ws->cur_layout->flags & + SWM_L_MAPONFOCUS)) + XMapRaised(display, win->id); TAILQ_FOREACH(win, &old_ws->winlist, entry) unmap_window(win); @@ -1365,8 +1367,8 @@ cyclescr(struct swm_region *r, union arg *args) }; unfocus_all(); XSetInputFocus(display, PointerRoot, RevertToPointerRoot, CurrentTime); - XWarpPointer(display, None, rr->s[i].root, 0, 0, 0, 0, rr->g.x, - rr->g.y + bar_enabled ? bar_height : 0); + XWarpPointer(display, None, rr->s[i].root, 0, 0, 0, 0, rr->g.x + 1, + rr->g.y + bar_enabled + 1 ? bar_height : 0); } void @@ -3710,8 +3712,6 @@ unmapnotify(XEvent *e) win = find_window(e->xunmap.window); if (win == NULL) goto done; - if (win->transient) - goto done; if (getstate(e->xunmap.window) == NormalState) { /* @@ -3731,8 +3731,9 @@ unmapnotify(XEvent *e) if (TAILQ_FIRST(&ws->winlist) == win) winfocus = TAILQ_NEXT(win, entry); else { - winfocus = TAILQ_PREV(ws->focus, ws_win_list, - entry); + if (ws->focus) + winfocus = TAILQ_PREV(ws->focus, + ws_win_list, entry); if (winfocus == NULL) winfocus = TAILQ_LAST(&ws->winlist, ws_win_list);