dwl

My patch set and modifications to dwl
git clone git://git.ethandl.dev/dwl
Log | Files | Refs | README | LICENSE

commit aa7020b344f83f0c64897f464021d9bc23790f05
parent 8f02449cb4a5b2097bdf13328f73c1439b7b9442
Author: Devin J. Pohly <djpohly@gmail.com>
Date:   Sun, 26 Apr 2020 19:48:28 -0500

abc

Diffstat:
Mdwl.c | 44++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)

diff --git 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); @@ -1046,27 +1046,6 @@ selclient(void) } 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) { /* If we're "grabbing" the cursor, don't use the client's image */ @@ -1110,6 +1089,27 @@ setmfact(const Arg *arg) } 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) { /* The backend is a wlroots feature which abstracts the underlying input and