From 21bafa5e697e1060dd91031d8714abe6f37490c9 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Tue, 29 Sep 2020 15:49:51 +0200 Subject: [PATCH] on_empty_keys: global isempty rather than per-monitor --- dwm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dwm.c b/dwm.c index a2e437b..724fe64 100644 --- a/dwm.c +++ b/dwm.c @@ -420,9 +420,6 @@ struct Monitor { unsigned int sellt; unsigned int tagset[2]; int showbar; - #if ON_EMPTY_KEYS_PATCH - int isempty; - #endif // ON_EMPTY_KEYS_PATCH Client *clients; Client *sel; Client *stack; @@ -710,6 +707,9 @@ static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast]; #else static Atom wmatom[WMLast], netatom[NetLast]; #endif // BAR_SYSTRAY_PATCH +#if ON_EMPTY_KEYS_PATCH +static int isempty = 0; +#endif // ON_EMPTY_KEYS_PATCH static int running = 1; static Cur *cursor[CurLast]; static Clr **scheme; @@ -1818,8 +1818,8 @@ focus(Client *c) drawbars(); #if ON_EMPTY_KEYS_PATCH - if ((selmon->isempty && selmon->sel) || (!selmon->isempty && !selmon->sel)) { - selmon->isempty = !selmon->isempty; + if ((isempty && selmon->sel) || (!isempty && !selmon->sel)) { + isempty = !isempty; grabkeys(); } #endif // ON_EMPTY_KEYS_PATCH