From 2b27a08668461ab83c2a4d2c084ed7ae18c965b0 Mon Sep 17 00:00:00 2001 From: Jochen Keil Date: Sat, 1 Sep 2012 21:46:46 +0200 Subject: Set StrutValues from showWindow This is superior to calling the repositionWin function. It will only set the StrutValues and avoid additional work. This means, that extra parameters need to be passed down to showWindow. However, that is not a problem here. --- src/Window.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Window.hs') diff --git a/src/Window.hs b/src/Window.hs index 7ff1ffe..29e1516 100644 --- a/src/Window.hs +++ b/src/Window.hs @@ -162,8 +162,14 @@ hideWindow d w = do unmapWindow d w sync d False -showWindow :: Display -> Window -> IO () -showWindow d w = mapWindow d w >> sync d False +showWindow :: Rectangle -> Config -> Display -> Window -> IO () +showWindow r cfg d w = do + srs <- getScreenInfo d + a <- internAtom d "_NET_WM_STRUT_PARTIAL" False + c <- internAtom d "CARDINAL" False + changeProperty32 d w a c propModeReplace $ map fi $ + getStrutValues r (position cfg) (getRootWindowHeight srs) + mapWindow d w >> sync d False isMapped :: Display -> Window -> IO Bool isMapped d w = fmap ism $ getWindowAttributes d w -- cgit v1.2.3