summaryrefslogtreecommitdiffstats
path: root/lib/Graphics/X11/EWMH.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Graphics/X11/EWMH.hs')
-rw-r--r--lib/Graphics/X11/EWMH.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Graphics/X11/EWMH.hs b/lib/Graphics/X11/EWMH.hs
index 856cfdb..fe9217a 100644
--- a/lib/Graphics/X11/EWMH.hs
+++ b/lib/Graphics/X11/EWMH.hs
@@ -48,6 +48,15 @@ getWindowTitle dpy w =
getWindowPropertyString dpy _NET_WM_NAME w <|>
getWindowPropertyString dpy _WM_NAME w
+moveWindowToDesktop :: Display -> Window -> CLong -> IO ()
+moveWindowToDesktop dpy w s =
+ allocaXEvent $ \e -> do
+ setEventType e clientMessage
+ setClientMessageEvent' e (fromIntegral w) _NET_WM_DESKTOP 32 [fromIntegral s,0,0,0,0]
+ sendEvent dpy (fromIntegral w) True mask e
+ where
+ mask = substructureNotifyMask
+
setDesktopNames :: [String] -> Display -> IO ()
setDesktopNames names dpy = do
changeProperty8 dpy r a t propModeReplace names'