[xmonad] Issue 255 in xmonad: Twitterfox extension does not receive mouse events when using Xmonad

codesite-noreply at google.com codesite-noreply at google.com
Mon Aug 10 17:59:22 EDT 2009


Comment #2 on issue 255 by konstantin.sobolev: Twitterfox extension does  
not receive mouse events when using Xmonad
http://code.google.com/p/xmonad/issues/detail?id=255

Workaround, put this into xmonad.hs (99% borrowed from
http://iportnov.blogspot.com/2009/01/xmonad.html)

import Graphics.X11.Xlib.Extras
import Foreign.C.Types (CLong)

getProp :: Atom -> Window -> X (Maybe [CLong])
getProp a w = withDisplay $ \dpy -> io $ getWindowProperty32 dpy a w


checkAtom name value = ask >>= \w -> liftX $ do
     a <- getAtom name
     val <- getAtom value
     mbr <- getProp a w
     case mbr of
         Just [r] -> return $ elem (fromIntegral r) [val]
         _ -> return False

checkDialog = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_DIALOG"
checkMenu = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_MENU"
checkUtility = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_UTILITY"

manageDialogs = checkDialog --> doFloat
manageMenus = checkMenu --> doFloat
manageUtilities = checkUtility --> doIgnore

manageFixes = manageDialogs <+> manageMenus <+> manageUtilities

-- and then in main config...
manageHook = .. <+> manageFixes

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


More information about the xmonad mailing list