mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-31 04:01:52 -07:00
notes on the firefox bug
basically we have to set focus ourselves. This means when we start managing a window, and when an XCrossingEvent occurs (which we don't handle). On Manage/Enter, we set focus. on Leave we set focus to root. See event.c and focus.c in dwm for more details.
This commit is contained in:
14
Main.hs
14
Main.hs
@@ -116,6 +116,11 @@ grabKeys dpy r = do
|
||||
-- [Expose] = expose,
|
||||
-- [PropertyNotify] = propertynotify,
|
||||
--
|
||||
-- on EnterNotify we should SetFocus to the window we're entering,
|
||||
-- on LeaveNotify, we set it back to root.
|
||||
--
|
||||
-- Needs XCrossing support
|
||||
--
|
||||
handle :: Event -> W ()
|
||||
|
||||
-- XCreateWindowEvent(3X11)
|
||||
@@ -199,11 +204,18 @@ windows f = do
|
||||
|
||||
-- | manage. Add a new window to be managed in the current workspace. Bring it into focus.
|
||||
-- If the window is already under management, it is just raised.
|
||||
--
|
||||
-- When we start to manage a window, it gains focus.
|
||||
--
|
||||
manage :: Window -> W ()
|
||||
manage w = do
|
||||
withDisplay $ io . flip mapWindow w
|
||||
withDisplay $ \d -> io $ do
|
||||
mapWindow d w
|
||||
-- setInputFocus d w revertToPointerRoot 0 -- CurrentTime
|
||||
windows $ W.push w
|
||||
|
||||
|
||||
|
||||
-- | unmanage. A window no longer exists, remove it from the window
|
||||
-- list, on whatever workspace it is.
|
||||
unmanage :: Window -> W ()
|
||||
|
Reference in New Issue
Block a user