mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-01 12:41:53 -07:00
Move safeFocus from Main to Operations
This commit is contained in:
7
Main.hs
7
Main.hs
@@ -121,13 +121,6 @@ grabKeys dpy rootw = do
|
|||||||
-- override_redirect member is True.
|
-- override_redirect member is True.
|
||||||
--
|
--
|
||||||
|
|
||||||
safeFocus :: Window -> X ()
|
|
||||||
safeFocus w = do ws <- gets workspace
|
|
||||||
if W.member w ws
|
|
||||||
then setFocus w
|
|
||||||
else do b <- isRoot w
|
|
||||||
when b setTopFocus
|
|
||||||
|
|
||||||
handle :: Event -> X ()
|
handle :: Event -> X ()
|
||||||
|
|
||||||
-- run window manager command
|
-- run window manager command
|
||||||
|
@@ -136,6 +136,13 @@ withServerX f = withDisplay $ \dpy -> do
|
|||||||
f
|
f
|
||||||
io $ ungrabServer dpy
|
io $ ungrabServer dpy
|
||||||
|
|
||||||
|
safeFocus :: Window -> X ()
|
||||||
|
safeFocus w = do ws <- gets workspace
|
||||||
|
if W.member w ws
|
||||||
|
then setFocus w
|
||||||
|
else do b <- isRoot w
|
||||||
|
when b setTopFocus
|
||||||
|
|
||||||
-- | Explicitly set the keyboard focus to the given window
|
-- | Explicitly set the keyboard focus to the given window
|
||||||
setFocus :: Window -> X ()
|
setFocus :: Window -> X ()
|
||||||
setFocus w = do
|
setFocus w = do
|
||||||
|
Reference in New Issue
Block a user