mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-14 03:35:54 -07:00
Fix EwmhDesktops, ManageDocks, and SetWMName compilation for amd64
This commit is contained in:
@@ -107,9 +107,9 @@ setClientList wins = withDisplay $ \dpy -> do
|
|||||||
r <- asks theRoot
|
r <- asks theRoot
|
||||||
c <- getAtom "WINDOW"
|
c <- getAtom "WINDOW"
|
||||||
a <- getAtom "_NET_CLIENT_LIST"
|
a <- getAtom "_NET_CLIENT_LIST"
|
||||||
io $ changeProperty32 dpy r a c propModeReplace wins
|
io $ changeProperty32 dpy r a c propModeReplace (fmap fromIntegral wins)
|
||||||
a' <- getAtom "_NET_CLIENT_LIST_STACKING"
|
a' <- getAtom "_NET_CLIENT_LIST_STACKING"
|
||||||
io $ changeProperty32 dpy r a' c propModeReplace wins
|
io $ changeProperty32 dpy r a' c propModeReplace (fmap fromIntegral wins)
|
||||||
|
|
||||||
setWindowDesktop :: (Integral a) => Window -> a -> X ()
|
setWindowDesktop :: (Integral a) => Window -> a -> X ()
|
||||||
setWindowDesktop win i = withDisplay $ \dpy -> do
|
setWindowDesktop win i = withDisplay $ \dpy -> do
|
||||||
@@ -123,7 +123,7 @@ setSupported = withDisplay $ \dpy -> do
|
|||||||
a <- getAtom "_NET_SUPPORTED"
|
a <- getAtom "_NET_SUPPORTED"
|
||||||
c <- getAtom "ATOM"
|
c <- getAtom "ATOM"
|
||||||
supp <- mapM getAtom ["_NET_WM_STATE_HIDDEN"]
|
supp <- mapM getAtom ["_NET_WM_STATE_HIDDEN"]
|
||||||
io $ changeProperty32 dpy r a c propModeReplace supp
|
io $ changeProperty32 dpy r a c propModeReplace (fmap fromIntegral supp)
|
||||||
|
|
||||||
setWMName "xmonad"
|
setWMName "xmonad"
|
||||||
|
|
||||||
|
@@ -69,7 +69,7 @@ checkDock w = do
|
|||||||
d <- getAtom "_NET_WM_WINDOW_TYPE_DOCK"
|
d <- getAtom "_NET_WM_WINDOW_TYPE_DOCK"
|
||||||
mbr <- getProp a w
|
mbr <- getProp a w
|
||||||
case mbr of
|
case mbr of
|
||||||
Just [r] -> return (r == d)
|
Just [r] -> return (fromIntegral r == d)
|
||||||
_ -> return False
|
_ -> return False
|
||||||
|
|
||||||
-- |
|
-- |
|
||||||
|
@@ -63,12 +63,12 @@ setWMName name = do
|
|||||||
dpy <- asks display
|
dpy <- asks display
|
||||||
io $ do
|
io $ do
|
||||||
-- _NET_SUPPORTING_WM_CHECK atom of root and support windows refers to the support window
|
-- _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)
|
-- 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)
|
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)
|
-- declare which _NET protocols are supported (append to the list if it exists)
|
||||||
supportedList <- fmap (join . maybeToList) $ getWindowProperty32 dpy atom_NET_SUPPORTED_ATOM root
|
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
|
where
|
||||||
netSupportingWMCheckAtom :: X Atom
|
netSupportingWMCheckAtom :: X Atom
|
||||||
netSupportingWMCheckAtom = getAtom "_NET_SUPPORTING_WM_CHECK"
|
netSupportingWMCheckAtom = getAtom "_NET_SUPPORTING_WM_CHECK"
|
||||||
@@ -81,7 +81,7 @@ setWMName name = do
|
|||||||
atom_NET_SUPPORTING_WM_CHECK <- netSupportingWMCheckAtom
|
atom_NET_SUPPORTING_WM_CHECK <- netSupportingWMCheckAtom
|
||||||
root <- asks theRoot
|
root <- asks theRoot
|
||||||
supportWindow <- fmap (join . fmap listToMaybe) $ io $ getWindowProperty32 dpy atom_NET_SUPPORTING_WM_CHECK root
|
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 :: Maybe Window -> X Window
|
||||||
validateWindow w = do
|
validateWindow w = do
|
||||||
|
Reference in New Issue
Block a user