mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
NetActiveWindow: make sure to unfocus previously selected window if moving to another monitor
This commit is contained in:
parent
7db8bb0ce9
commit
e350e4d93d
7
dwm.c
7
dwm.c
@ -1214,12 +1214,13 @@ clientmessage(XEvent *e)
|
|||||||
}
|
}
|
||||||
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
||||||
#if FOCUSONNETACTIVE_PATCH
|
#if FOCUSONNETACTIVE_PATCH
|
||||||
if (c->tags & c->mon->tagset[c->mon->seltags]) {
|
if (c->tags & c->mon->tagset[c->mon->seltags])
|
||||||
selmon = c->mon;
|
|
||||||
focus(c);
|
focus(c);
|
||||||
} else {
|
else {
|
||||||
for (i = 0; i < NUMTAGS && !((1 << i) & c->tags); i++);
|
for (i = 0; i < NUMTAGS && !((1 << i) & c->tags); i++);
|
||||||
if (i < NUMTAGS) {
|
if (i < NUMTAGS) {
|
||||||
|
if (c != selmon->sel)
|
||||||
|
unfocus(selmon->sel, 0, NULL);
|
||||||
selmon = c->mon;
|
selmon = c->mon;
|
||||||
if (((1 << i) & TAGMASK) != selmon->tagset[selmon->seltags])
|
if (((1 << i) & TAGMASK) != selmon->tagset[selmon->seltags])
|
||||||
view(&((Arg) { .ui = 1 << i }));
|
view(&((Arg) { .ui = 1 << i }));
|
||||||
|
@ -172,7 +172,7 @@ flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Ar
|
|||||||
return;
|
return;
|
||||||
int i, nclienttags = 0, nviewtags = 0, pad = lrpad / 2;
|
int i, nclienttags = 0, nviewtags = 0, pad = lrpad / 2;
|
||||||
int clientscheme = (
|
int clientscheme = (
|
||||||
c == m->sel
|
c == selmon->sel
|
||||||
? getselschemefor(tabscheme)
|
? getselschemefor(tabscheme)
|
||||||
: HIDDEN(c)
|
: HIDDEN(c)
|
||||||
? SchemeHid
|
? SchemeHid
|
||||||
|
Loading…
Reference in New Issue
Block a user