aboutsummaryrefslogtreecommitdiffstats
path: root/SetWMName.hs
diff options
context:
space:
mode:
authorAlex Tarkovsky <alextarkovsky@gmail.com>2007-10-10 23:38:53 +0200
committerAlex Tarkovsky <alextarkovsky@gmail.com>2007-10-10 23:38:53 +0200
commit2f71ea564022ea66b4c1863b4a980e76c5cae0d2 (patch)
tree282715c52b3d947852695d555dd613de0bc496d8 /SetWMName.hs
parente10319fb0e72937246ff27d8f93d9d5c756ce7f1 (diff)
downloadXMonadContrib-2f71ea564022ea66b4c1863b4a980e76c5cae0d2.tar.gz
XMonadContrib-2f71ea564022ea66b4c1863b4a980e76c5cae0d2.tar.xz
XMonadContrib-2f71ea564022ea66b4c1863b4a980e76c5cae0d2.zip
Fix EwmhDesktops, ManageDocks, and SetWMName compilation for amd64
darcs-hash:20071010213853-bd4fb-66e3492b55dc7aeb9dee18201a66f540b52e8b53.gz
Diffstat (limited to 'SetWMName.hs')
-rw-r--r--SetWMName.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/SetWMName.hs b/SetWMName.hs
index 84e346e..da7af3d 100644
--- a/SetWMName.hs
+++ b/SetWMName.hs
@@ -63,12 +63,12 @@ setWMName name = do
dpy <- asks display
io $ do
-- _NET_SUPPORTING_WM_CHECK atom of root and support windows refers to the support window
- mapM_ (\w -> changeProperty32 dpy w atom_NET_SUPPORTING_WM_CHECK wINDOW 0 [supportWindow]) [root, supportWindow]
+ mapM_ (\w -> changeProperty32 dpy w atom_NET_SUPPORTING_WM_CHECK wINDOW 0 [fromIntegral supportWindow]) [root, supportWindow]
-- set WM_NAME in supportWindow (now only accepts latin1 names to eliminate dependency on utf8 encoder)
changeProperty8 dpy supportWindow atom_NET_WM_NAME atom_UTF8_STRING 0 (latin1StringToWord8List name)
-- declare which _NET protocols are supported (append to the list if it exists)
supportedList <- fmap (join . maybeToList) $ getWindowProperty32 dpy atom_NET_SUPPORTED_ATOM root
- changeProperty32 dpy root atom_NET_SUPPORTED_ATOM aTOM 0 (nub $ atom_NET_SUPPORTING_WM_CHECK : atom_NET_WM_NAME : supportedList)
+ changeProperty32 dpy root atom_NET_SUPPORTED_ATOM aTOM 0 (nub $ fromIntegral atom_NET_SUPPORTING_WM_CHECK : fromIntegral atom_NET_WM_NAME : supportedList)
where
netSupportingWMCheckAtom :: X Atom
netSupportingWMCheckAtom = getAtom "_NET_SUPPORTING_WM_CHECK"
@@ -81,7 +81,7 @@ setWMName name = do
atom_NET_SUPPORTING_WM_CHECK <- netSupportingWMCheckAtom
root <- asks theRoot
supportWindow <- fmap (join . fmap listToMaybe) $ io $ getWindowProperty32 dpy atom_NET_SUPPORTING_WM_CHECK root
- validateWindow supportWindow
+ validateWindow (fmap fromIntegral supportWindow)
validateWindow :: Maybe Window -> X Window
validateWindow w = do
@@ -96,7 +96,7 @@ setWMName name = do
isValidWindow w = withDisplay $ \dpy -> io $ alloca $ \p -> do
status <- xGetWindowAttributes dpy w p
return (status /= 0)
-
+
-- this code was translated from C (see OpenBox WM, screen.c)
createSupportWindow :: X Window
createSupportWindow = withDisplay $ \dpy -> do