aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-05-23 11:36:36 +0000
committerLeonard Kugis <leonard@kug.is>2025-05-23 11:36:36 +0000
commit9fa9a6305223f0548ae5664b9be16e39ba59eebb (patch)
tree1cb12dc35018f3a3f801269e06208db051060776
parent74e45c4014ae7048ecbb76eb6f54034b8b479480 (diff)
downloaddwl-master.tar.gz
dwl-master.tar.bz2
dwl-master.zip
Personal configurationHEADmaster
-rw-r--r--config.mk4
-rw-r--r--dwl.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/config.mk b/config.mk
index 1e0b810..fb99950 100644
--- a/config.mk
+++ b/config.mk
@@ -11,7 +11,7 @@ DATADIR = $(PREFIX)/share
XWAYLAND =
XLIBS =
# Uncomment to build XWayland support
-#XWAYLAND = -DXWAYLAND
-#XLIBS = xcb xcb-icccm
+XWAYLAND = -DXWAYLAND
+XLIBS = xcb xcb-icccm
CC = gcc
diff --git a/dwl.c b/dwl.c
index a2711f6..50bbbc4 100644
--- a/dwl.c
+++ b/dwl.c
@@ -478,6 +478,10 @@ applyrules(Client *c)
}
}
}
+ if (mon) {
+ c->geom.x = (mon->w.width - c->geom.width) / 2 + mon->m.x;
+ c->geom.y = (mon->w.height - c->geom.height) / 2 + mon->m.y;
+ }
setmon(c, mon, newtags);
}
@@ -1734,6 +1738,10 @@ mapnotify(struct wl_listener *listener, void *data)
* try to apply rules for them */
if ((p = client_get_parent(c))) {
c->isfloating = 1;
+ if (p->mon) {
+ c->geom.x = (p->mon->w.width - c->geom.width) / 2 + p->mon->m.x;
+ c->geom.y = (p->mon->w.height - c->geom.height) / 2 + p->mon->m.y;
+ }
setmon(c, p->mon, p->tags);
} else {
applyrules(c);