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
7
dwm.c
7
dwm.c
|
@ -951,8 +951,13 @@ expose(XEvent *e)
|
||||||
void
|
void
|
||||||
focus(Client *c)
|
focus(Client *c)
|
||||||
{
|
{
|
||||||
if (!c || !ISVISIBLE(c))
|
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);
|
for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
|
||||||
|
}
|
||||||
|
|
||||||
if (selmon->sel && selmon->sel != c)
|
if (selmon->sel && selmon->sel != c)
|
||||||
unfocus(selmon->sel, 0);
|
unfocus(selmon->sel, 0);
|
||||||
if (c) {
|
if (c) {
|
||||||
|
|
Loading…
Reference in a new issue