mirror of
https://github.com/xmonad/xmonad.git
synced 2025-09-03 12:13:48 -07:00
Fix float behaviour, add shiftWin.
First, if float is called with window which is on a hidden workspace, then the window will remain on that hidden workspace. Now the focus should change more as expected: float w = (view current) . (shiftWin ws w) where current is the current screen/workspace shiftWin ws w is: - view the workspace w is on - set focus on w - shift ws - set focus back to window it was on that workspace unless w was focused shiftWin was add to StackSet.hs
This commit is contained in:
7
Main.hs
7
Main.hs
@@ -29,7 +29,7 @@ import Graphics.X11.Xinerama (getScreenInfo)
|
||||
|
||||
import XMonad
|
||||
import Config
|
||||
import StackSet (new, floating, member, findIndex, workspace, tag, current, visible)
|
||||
import StackSet (new, floating, member)
|
||||
import qualified StackSet as W
|
||||
import Operations
|
||||
|
||||
@@ -226,10 +226,7 @@ handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do
|
||||
ws <- gets windowset
|
||||
wa <- io $ getWindowAttributes dpy w
|
||||
|
||||
-- TODO temporary workaround for some bugs in float. Don't call 'float' on
|
||||
-- windows that aren't visible, because it changes the focused screen
|
||||
let vis = any ((== findIndex w ws) . Just . tag . workspace) (current ws : visible ws)
|
||||
if (M.member w (floating ws) && vis)
|
||||
if M.member w (floating ws)
|
||||
|| not (member w ws)
|
||||
then do io $ configureWindow dpy w (ev_value_mask e) $ WindowChanges
|
||||
{ wc_x = ev_x e
|
||||
|
Reference in New Issue
Block a user