diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2020-04-26 14:11:44 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2020-04-26 14:11:44 -0500 |
commit | cd6683e6a1a9afdbb397433658ba85925dbf437c (patch) | |
tree | 5622a621c008178a6abe8f718882998ce16fb708 | |
parent | 88f0ea343bbb103fed819c4d3febec4d7044a246 (diff) |
fix refocus on sendmon
-rw-r--r-- | dwl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1057,6 +1057,7 @@ sendmon(Client *c, Monitor *m) { if (c->mon == m) return; + int hadfocus = (c == selclient()); c->mon = m; /* Make sure window actually overlaps with the monitor */ 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); c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ - if (c == selclient()) + if (hadfocus) refocus(); } |