summaryrefslogtreecommitdiffstats
path: root/lib/Phi/X11.hs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-10-08 05:12:41 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-10-08 05:12:41 +0200
commit456f9fb6e6d743702fcca79f4d23e1e5f40c530d (patch)
tree5d5558f02ae3420271bffc3336fada200abcee63 /lib/Phi/X11.hs
parent579552b29b396943c3a2c97456c37c8005729ce1 (diff)
downloadphi-456f9fb6e6d743702fcca79f4d23e1e5f40c530d.tar
phi-456f9fb6e6d743702fcca79f4d23e1e5f40c530d.zip
Adjust to patched xhb version
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'