summaryrefslogtreecommitdiffstats
path: root/lib/Phi/X11.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Phi/X11.hs')
-rw-r--r--lib/Phi/X11.hs17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/Phi/X11.hs b/lib/Phi/X11.hs
index e08c990..9b93328 100644
--- a/lib/Phi/X11.hs
+++ b/lib/Phi/X11.hs
@@ -9,6 +9,7 @@ module Phi.X11 ( X11(..)
) where
import Graphics.XHB hiding (Window)
+import Graphics.XHB.Connection
import qualified Graphics.XHB.Connection.Open as CO
import Graphics.XHB.Gen.Xinerama
import Graphics.XHB.Gen.Xproto hiding (Window)
@@ -54,11 +55,8 @@ instance Display X11 where
type Window X11 = WINDOW
-newtype XEvent = XEvent SomeEvent deriving Typeable
+newtype XEvent = XEvent SomeEvent deriving (Show, Typeable)
-instance Show XEvent where
- show _ = "XEvent (..)"
-
data XMessage = UpdateScreens [(Rectangle, WINDOW)] deriving (Show, Typeable)
@@ -274,11 +272,12 @@ handleConfigureNotifyEvent MkConfigureNotifyEvent { window_ConfigureNotifyEvent
let rect = panelBounds config screenarea
win = panelWindow panel
- liftIO $ configureWindow conn win $ toValueParam [ (ConfigWindowX, fromIntegral $ rect_x rect)
- , (ConfigWindowY, fromIntegral $ rect_y rect)
- , (ConfigWindowWidth, fromIntegral $ rect_width rect)
- , (ConfigWindowHeight, fromIntegral $ rect_height rect)
- ]
+ liftIO $ configureWindow conn $ MkConfigureWindow win (toMask [ConfigWindowX, ConfigWindowY, ConfigWindowWidth, ConfigWindowHeight]) $
+ toValueParam [ (ConfigWindowX, fromIntegral $ rect_x rect)
+ , (ConfigWindowY, fromIntegral $ rect_y rect)
+ , (ConfigWindowWidth, fromIntegral $ rect_width rect)
+ , (ConfigWindowHeight, fromIntegral $ rect_height rect)
+ ]
panel' <- createPanel win screenarea
setPanelProperties panel'