From aa7020b344f83f0c64897f464021d9bc23790f05 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Sun, 26 Apr 2020 19:48:28 -0500 Subject: [PATCH] abc --- dwl.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/dwl.c b/dwl.c index a5fad26..f32b163 100644 --- a/dwl.c +++ b/dwl.c @@ -162,10 +162,10 @@ static void resizemouse(const Arg *arg); static void run(char *startup_cmd); static void scalebox(struct wlr_box *box, float scale); static Client *selclient(void); -static void setmon(Client *c, Monitor *m); static void setcursor(struct wl_listener *listener, void *data); static void setlayout(const Arg *arg); static void setmfact(const Arg *arg); +static void setmon(Client *c, Monitor *m); static void setup(void); static void spawn(const Arg *arg); static void tag(const Arg *arg); @@ -1045,27 +1045,6 @@ selclient(void) return c; } -void -setmon(Client *c, Monitor *m) -{ - if (c->mon == m) - return; - int hadfocus = (c == selclient()); - /* XXX leave/enter should be in resize and check all outputs */ - if (c->mon) - wlr_surface_send_leave(c->xdg_surface->surface, c->mon->wlr_output); - c->mon = m; - if (m) { - /* Make sure window actually overlaps with the monitor */ - applybounds(c, &m->m); - wlr_surface_send_enter(c->xdg_surface->surface, m->wlr_output); - c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ - } - /* Focus can change if c is the top of selmon before or after */ - if (hadfocus || c == selclient()) - refocus(); -} - void setcursor(struct wl_listener *listener, void *data) { @@ -1109,6 +1088,27 @@ setmfact(const Arg *arg) selmon->mfact = f; } +void +setmon(Client *c, Monitor *m) +{ + if (c->mon == m) + return; + int hadfocus = (c == selclient()); + /* XXX leave/enter should be in resize and check all outputs */ + if (c->mon) + wlr_surface_send_leave(c->xdg_surface->surface, c->mon->wlr_output); + c->mon = m; + if (m) { + /* Make sure window actually overlaps with the monitor */ + applybounds(c, &m->m); + wlr_surface_send_enter(c->xdg_surface->surface, m->wlr_output); + c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ + } + /* Focus can change if c is the top of selmon before or after */ + if (hadfocus || c == selclient()) + refocus(); +} + void setup(void) {