diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-09-08 01:27:01 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-09-08 01:27:01 +0200 |
commit | 234388ef387c92cc72f35cb309b9d0beea8d3a1a (patch) | |
tree | 775b2179396de6545827a81c3045b9c6a8c3a7fd | |
parent | aadf8d978032db0305045d3cf9f2ef08cdec6197 (diff) | |
download | phi-234388ef387c92cc72f35cb309b9d0beea8d3a1a.tar phi-234388ef387c92cc72f35cb309b9d0beea8d3a1a.zip |
First render, then map panel windows
-rw-r--r-- | lib/Phi/Widget.hs | 2 | ||||
-rw-r--r-- | lib/Phi/X11.hs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Phi/Widget.hs b/lib/Phi/Widget.hs index 25b08d4..a598887 100644 --- a/lib/Phi/Widget.hs +++ b/lib/Phi/Widget.hs @@ -37,8 +37,6 @@ import Graphics.Rendering.Cairo import Phi.Phi import Phi.X11.Atoms -import Debug.Trace - data Display = Display !Connection !Atoms diff --git a/lib/Phi/X11.hs b/lib/Phi/X11.hs index a4fd5c1..7e0bfff 100644 --- a/lib/Phi/X11.hs +++ b/lib/Phi/X11.hs @@ -124,7 +124,7 @@ runPhi xconfig config widget = do } PhiState { phiRootImage = bg , phiPanels = [] - , phiRepaint = True + , phiRepaint = False , phiShutdown = False , phiShutdownHold = 0 , phiWidgetState = initialState @@ -133,12 +133,14 @@ runPhi xconfig config widget = do panels <- mapM (\(screen, window) -> createPanel conn window screen) screenPanels - forM_ panels $ \panel -> do - setPanelProperties conn panel - liftIO $ mapWindow conn (panelWindow panel) + forM_ panels $ setPanelProperties conn modify $ \state -> state { phiPanels = panels } + updatePanels conn xcb + + forM_ panels $ liftIO . mapWindow conn . panelWindow + liftIO $ forkIO $ receiveEvents phi conn forever $ do |