aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-04-26 19:48:28 -0500
committerDevin J. Pohly <djpohly@gmail.com>2020-04-26 19:48:28 -0500
commitaa7020b344f83f0c64897f464021d9bc23790f05 (patch)
tree17518e494e1e8a7e9b3e0834986c6d4eed2a4bf3
parent8f02449cb4a5b2097bdf13328f73c1439b7b9442 (diff)
abc
-rw-r--r--dwl.c44
1 files 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);
@@ -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