mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
fix refocus on sendmon
This commit is contained in:
parent
88f0ea343b
commit
cd6683e6a1
1 changed files with 2 additions and 1 deletions
3
dwl.c
3
dwl.c
|
@ -1057,6 +1057,7 @@ sendmon(Client *c, Monitor *m)
|
||||||
{
|
{
|
||||||
if (c->mon == m)
|
if (c->mon == m)
|
||||||
return;
|
return;
|
||||||
|
int hadfocus = (c == selclient());
|
||||||
c->mon = m;
|
c->mon = m;
|
||||||
/* Make sure window actually overlaps with the monitor */
|
/* Make sure window actually overlaps with the monitor */
|
||||||
applybounds(c, &c->mon->m);
|
applybounds(c, &c->mon->m);
|
||||||
|
@ -1064,7 +1065,7 @@ sendmon(Client *c, Monitor *m)
|
||||||
wlr_surface_send_enter(c->xdg_surface->surface, c->mon->wlr_output);
|
wlr_surface_send_enter(c->xdg_surface->surface, c->mon->wlr_output);
|
||||||
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||||
|
|
||||||
if (c == selclient())
|
if (hadfocus)
|
||||||
refocus();
|
refocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue