Merge pull request #181 from ethanv2/sticky-patch-1
Don't automatically focus sticky windows
This commit is contained in:
commit
8306102dac
1 changed files with 7 additions and 2 deletions
9
dwm.c
9
dwm.c
|
@ -951,8 +951,13 @@ expose(XEvent *e)
|
|||
void
|
||||
focus(Client *c)
|
||||
{
|
||||
if (!c || !ISVISIBLE(c))
|
||||
for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
|
||||
if (!c || !ISVISIBLE(c)) {
|
||||
for (c = selmon->stack; c && (!ISVISIBLE(c) || (c->issticky && !selmon->sel->issticky)); c = c->snext);
|
||||
|
||||
if (!c) /* No windows found; check for available stickies */
|
||||
for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
|
||||
}
|
||||
|
||||
if (selmon->sel && selmon->sel != c)
|
||||
unfocus(selmon->sel, 0);
|
||||
if (c) {
|
||||
|
|
Loading…
Reference in a new issue