From af80bfde799cca43c184fcf79f7a2380c3766f13 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Thu, 13 Aug 2020 10:52:22 -0400 Subject: [PATCH] only get windowstack on focusin if needed --- src/nimwin.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nimwin.nim b/src/nimwin.nim index effddb1..9feef51 100644 --- a/src/nimwin.nim +++ b/src/nimwin.nim @@ -574,10 +574,9 @@ when isMainModule: elif (ev.theType == FocusIn): let currentFocus = windowZipper.zipperFocus - let windowStack = map(toSeq(getChildren(display)), (w) => w.win) - if currentFocus.isSome: if currentFocus.get != ev.xfocus.window: + let windowStack = map(toSeq(getChildren(display)), (w) => w.win) # restack it windowZipper.rhs = windowStack.reversed windowZipper.lhs = @[]