assign tags even if the monitor is the same

this solves the last commit problem
This commit is contained in:
Sevz17 2021-06-16 11:57:32 -05:00
parent 1652d0a5d5
commit 0bb569913b

4
dwl.c
View File

@ -1934,6 +1934,9 @@ setmon(Client *c, Monitor *m, unsigned int newtags)
{ {
Monitor *oldmon = c->mon; Monitor *oldmon = c->mon;
if (m)
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
if (oldmon == m) if (oldmon == m)
return; return;
c->mon = m; c->mon = m;
@ -1947,7 +1950,6 @@ setmon(Client *c, Monitor *m, unsigned int newtags)
/* Make sure window actually overlaps with the monitor */ /* Make sure window actually overlaps with the monitor */
applybounds(c, &m->m); applybounds(c, &m->m);
wlr_surface_send_enter(client_surface(c), m->wlr_output); wlr_surface_send_enter(client_surface(c), m->wlr_output);
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
arrange(m); arrange(m);
} }
focusclient(focustop(selmon), 1); focusclient(focustop(selmon), 1);