summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-03-04 02:43:07 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-03-04 02:43:07 +0100
commit8dffc6e722a58924ea65b50dc0e1471b3dd3976b (patch)
treee04e5e26a12c4acec842b7e011c809580a560445
parentc9d6896cbd7e03af344f5d053c267174ccd10a11 (diff)
downloadxmobar-8dffc6e722a58924ea65b50dc0e1471b3dd3976b.tar.gz
xmobar-8dffc6e722a58924ea65b50dc0e1471b3dd3976b.tar.bz2
Delay as much as possible setting window properties
-rw-r--r--src/Window.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Window.hs b/src/Window.hs
index e7dc9e6..ec50883 100644
--- a/src/Window.hs
+++ b/src/Window.hs
@@ -1,7 +1,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : Window
--- Copyright : (c) 2011-12 Jose A. Ortega Ruiz
+-- Copyright : (c) 2011-13 Jose A. Ortega Ruiz
-- : (c) 2012 Jochen Keil
-- License : BSD-style (see LICENSE)
--
@@ -39,9 +39,9 @@ createWin d fs c = do
let ht = as + ds + 4
(r,o) = setPosition (position c) srs (fi ht)
win <- newWindow d (defaultScreenOfDisplay d) rootw r o
- setProperties r c d win srs
when (lowerOnStart c) (lowerWindow d win)
when (not $ hideOnStart c) $ showWindow r c d win
+ setProperties r c d win srs
return (r,win)
-- | Updates the size and position of the window
@@ -86,7 +86,8 @@ setPosition p rs ht =
ny' h' = ry + fi (rh - mh h')
safeIndex i = lookup i . zip [0..]
-setProperties :: Rectangle -> Config -> Display -> Window -> [Rectangle] -> IO ()
+setProperties :: Rectangle -> Config -> Display -> Window -> [Rectangle]
+ -> IO ()
setProperties r c d w srs = do
a1 <- internAtom d "_NET_WM_STRUT_PARTIAL" False
c1 <- internAtom d "CARDINAL" False