summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-10-25 23:30:54 +0100
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-10-25 23:30:54 +0100
commit88e0b350a366281184716f98d31cd25a8f5fc782 (patch)
tree8c16b7881692ab502aa0d418bb0f801d3944ce49 /dwm.c
parentdfa6aebfc19c98f062a1335b981723628fb6066a (diff)
fix monocle layout, and remove commented code
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index 39c578e..2abf0c3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -494,8 +494,7 @@ buttonpress(XEvent *e)
selmon = m;
focus(NULL);
}
- // if (ev->window == selmon->barwin) {
- /* } else */ if ((c = wintoclient(ev->window))) {
+ if ((c = wintoclient(ev->window))) {
focus(c);
restack(selmon);
XAllowEvents(dpy, ReplayPointer, CurrentTime);
@@ -784,6 +783,9 @@ focus(Client *c)
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
}
setfocus(c);
+
+ if (selmon->lt[selmon->sellt]->arrange == monocle)
+ XRaiseWindow(dpy, c->win);
} else {
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);