From 234388ef387c92cc72f35cb309b9d0beea8d3a1a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 8 Sep 2011 01:27:01 +0200 Subject: First render, then map panel windows --- lib/Phi/Widget.hs | 2 -- lib/Phi/X11.hs | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/Phi') 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 -- cgit v1.2.3