
New patches:

[add XWMHints bindings
Devin Mullins <me@twifkak.com>**20071010044501
 also added withdrawnState, normalState, and iconicState, which are somewhat related
] {
hunk ./Graphics/X11/Xlib/Extras.hsc 1198
+------------------------------------------------------------------------
+-- WM Hints
+
+-- These are the documented values for a window's "WM State", set, for example,
+-- in wmh_initial_state, below. Note, you may need to play games with
+-- fromIntegral and/or fromEnum.
+withdrawnState = #{const WithdrawnState} :: Int
+normalState    = #{const NormalState}    :: Int
+iconicState    = #{const IconicState}    :: Int
+
+-- The following values are the documented bit positions on XWMHints's flags field.
+-- Use testBit, setBit, and clearBit to manipulate the field.
+inputHintBit        = 0 :: Int
+stateHintBit        = 1 :: Int
+iconPixmapHintBit   = 2 :: Int
+iconWindowHintBit   = 3 :: Int
+iconPositionHintBit = 4 :: Int
+iconMaskHintBit     = 5 :: Int
+windowGroupHintBit  = 6 :: Int
+urgencyHintBit      = 8 :: Int
+
+-- The following bitmask tests for the presence of all bits except for the
+-- urgencyHintBit.
+allHintsBitmask    = #{const AllHints} :: CLong
+
+data WMHints = WMHints
+                 { wmh_flags         :: CLong
+                 , wmh_input         :: Bool
+                 , wmh_initial_state :: CInt
+                 , wmh_icon_pixmap   :: Pixmap
+                 , wmh_icon_window   :: Window
+                 , wmh_icon_x        :: CInt
+                 , wmh_icon_y        :: CInt
+                 , wmh_icon_mask     :: Pixmap
+                 , wmh_window_group  :: XID
+                 }
+
+instance Storable WMHints where
+    -- should align to the alignment of the largest type
+    alignment _ = alignment (undefined :: CLong)
+    sizeOf _ = #{size XWMHints}
+
+    peek p = return WMHints
+                `ap` #{peek XWMHints, flags}         p
+                `ap` #{peek XWMHints, input}         p
+                `ap` #{peek XWMHints, initial_state} p
+                `ap` #{peek XWMHints, icon_pixmap}   p
+                `ap` #{peek XWMHints, icon_window}   p
+                `ap` #{peek XWMHints, icon_x}        p
+                `ap` #{peek XWMHints, icon_x}        p
+                `ap` #{peek XWMHints, icon_mask}     p
+                `ap` #{peek XWMHints, window_group}  p
+
+    poke p wmh = do
+        #{poke XWMHints, flags}         p $ wmh_flags         wmh
+        #{poke XWMHints, input}         p $ wmh_input         wmh
+        #{poke XWMHints, initial_state} p $ wmh_initial_state wmh
+        #{poke XWMHints, icon_pixmap}   p $ wmh_icon_pixmap   wmh
+        #{poke XWMHints, icon_window}   p $ wmh_icon_window   wmh
+        #{poke XWMHints, icon_x}        p $ wmh_icon_x        wmh
+        #{poke XWMHints, icon_y}        p $ wmh_icon_y        wmh
+        #{poke XWMHints, icon_mask}     p $ wmh_icon_mask     wmh
+        #{poke XWMHints, window_group}  p $ wmh_window_group  wmh
+
+foreign import ccall unsafe "Xutils.h XGetWMHints"
+    xGetWMHints :: Display -> Window -> IO (Ptr WMHints)
+
+getWMHints :: Display -> Window -> IO WMHints
+getWMHints dpy w = xGetWMHints dpy w >>= peek
+
+foreign import ccall unsafe "Xutils.h XAllocWMHints"
+    xAllocWMHints :: IO (Ptr WMHints)
+
+foreign import ccall unsafe "Xutils.h XSetWMHints"
+    xSetWMHints :: Display -> Window -> Ptr WMHints -> IO Status
+
+setWMHints :: Display -> Window -> WMHints -> IO Status
+setWMHints dpy w wmh = do
+    p_wmh <- xAllocWMHints
+    poke p_wmh wmh
+    res <- xSetWMHints dpy w p_wmh
+    xFree p_wmh
+    return res
+
}

Context:

[Add ExposeEvent structure
Christian Thiemann <mail@christian-thiemann.de>**20071007130647] 
[Add PropertyEvent structure to capture PropertyNotifyEvents
Christian Thiemann <mail@christian-thiemann.de>**20071006175712] 
[Added wcDrawImageString and wcTextEscapement
Andrea Rossato <andrea.rossato@unibz.it>**20070913192331] 
[Add functions to draw text in the user's locale
Mats Jansborg <mats@jansb.org>**20070818235123
 Added the FontSet type as well as the functions createFontSet,
 freeFontSet, wcTextExtents and wcDrawString that can be used to draw
 internationalised text.
] 
[Added support for parsing SelectionRequest and building SelectionNotify events
Matthew Sackman <matthew@wellquite.org>**20070909220631] 
[TAG 0.3
Spencer Janssen <sjanssen@cse.unl.edu>**20070903215156] 
Patch bundle hash:
13c79fc3a02c40c28e92af4bca295b46a4544b1e
