From e1d6171bb8a2eadb59f3ba8e45860d8d9c0734d8 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Tue, 23 Jun 2020 12:20:13 -0400 Subject: [PATCH] use both partial and regular struts properties when calculating struts --- src/nimwin.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nimwin.nim b/src/nimwin.nim index c334ef9..1d18184 100644 --- a/src/nimwin.nim +++ b/src/nimwin.nim @@ -262,7 +262,7 @@ processChan.open(0) proc startTerminal() : Process = let terminal_path = getEnv("NIMWIN_TERMINAL", "/usr/bin/urxvt") - startProcess(terminal_path) + startProcess(terminal_path, "", ["-e", "tmux"]) proc launcher() : Process = let launcher_path = getEnv("NIMWIN_LAUNCHER", "/usr/bin/dmenu_run") @@ -276,7 +276,7 @@ proc handleProcess(p : Process) = proc calculateStruts(display : PDisplay) : tuple[top: uint, bottom: uint]= for win in getChildren(display): for prop in win.props: - if prop.kind == pkCardinal and prop.name == "_NET_WM_STRUT_PARTIAL": + if prop.kind == pkCardinal and prop.name.startsWith("_NET_WM_STRUT"): result.top = max(result.top, prop.cardinalProp[2]) result.bottom = max(result.bottom, prop.cardinalProp[3])