First render, then map panel windows
This commit is contained in:
parent
aadf8d9780
commit
234388ef38
2 changed files with 6 additions and 6 deletions
|
@ -37,8 +37,6 @@ import Graphics.Rendering.Cairo
|
||||||
import Phi.Phi
|
import Phi.Phi
|
||||||
import Phi.X11.Atoms
|
import Phi.X11.Atoms
|
||||||
|
|
||||||
import Debug.Trace
|
|
||||||
|
|
||||||
|
|
||||||
data Display = Display !Connection !Atoms
|
data Display = Display !Connection !Atoms
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ runPhi xconfig config widget = do
|
||||||
}
|
}
|
||||||
PhiState { phiRootImage = bg
|
PhiState { phiRootImage = bg
|
||||||
, phiPanels = []
|
, phiPanels = []
|
||||||
, phiRepaint = True
|
, phiRepaint = False
|
||||||
, phiShutdown = False
|
, phiShutdown = False
|
||||||
, phiShutdownHold = 0
|
, phiShutdownHold = 0
|
||||||
, phiWidgetState = initialState
|
, phiWidgetState = initialState
|
||||||
|
@ -133,12 +133,14 @@ runPhi xconfig config widget = do
|
||||||
|
|
||||||
panels <- mapM (\(screen, window) -> createPanel conn window screen) screenPanels
|
panels <- mapM (\(screen, window) -> createPanel conn window screen) screenPanels
|
||||||
|
|
||||||
forM_ panels $ \panel -> do
|
forM_ panels $ setPanelProperties conn
|
||||||
setPanelProperties conn panel
|
|
||||||
liftIO $ mapWindow conn (panelWindow panel)
|
|
||||||
|
|
||||||
modify $ \state -> state { phiPanels = panels }
|
modify $ \state -> state { phiPanels = panels }
|
||||||
|
|
||||||
|
updatePanels conn xcb
|
||||||
|
|
||||||
|
forM_ panels $ liftIO . mapWindow conn . panelWindow
|
||||||
|
|
||||||
liftIO $ forkIO $ receiveEvents phi conn
|
liftIO $ forkIO $ receiveEvents phi conn
|
||||||
|
|
||||||
forever $ do
|
forever $ do
|
||||||
|
|
Reference in a new issue