diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-03-04 02:43:07 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-03-04 02:43:07 +0100 |
commit | 8dffc6e722a58924ea65b50dc0e1471b3dd3976b (patch) | |
tree | e04e5e26a12c4acec842b7e011c809580a560445 /src | |
parent | c9d6896cbd7e03af344f5d053c267174ccd10a11 (diff) | |
download | xmobar-8dffc6e722a58924ea65b50dc0e1471b3dd3976b.tar.gz xmobar-8dffc6e722a58924ea65b50dc0e1471b3dd3976b.tar.bz2 |
Delay as much as possible setting window properties
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.hs | 7 |
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 |