From 88e0b350a366281184716f98d31cd25a8f5fc782 Mon Sep 17 00:00:00 2001 From: ProsperousPotato Date: Sat, 25 Oct 2025 23:30:54 +0100 Subject: fix monocle layout, and remove commented code --- config.mk | 5 +---- dwm.c | 6 ++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/config.mk b/config.mk index d9903cb..e925d91 100644 --- a/config.mk +++ b/config.mk @@ -17,6 +17,7 @@ XINERAMAFLAGS = -DXINERAMA # freetype FREETYPELIBS = -lfontconfig -lXft FREETYPEINC = /usr/include/freetype2 + # OpenBSD # FREETYPEINC = ${X11INC}/freetype2 # MANPREFIX = ${PREFIX}/man @@ -31,9 +32,5 @@ CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VE CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -O3 -march=native -mtune=native ${INCS} ${CPPFLAGS} LDFLAGS = ${LIBS} -# Solaris -#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" -#LDFLAGS = ${LIBS} - # compiler and linker CC = cc 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]); -- cgit v1.2.3