temporary workaround for delete/focus issue in fullscreen mode

This commit is contained in:
Don Stewart
2007-06-06 02:49:38 +00:00
parent 86ea7f7bc0
commit d7d8c586cb

View File

@@ -149,24 +149,30 @@ windows f = do
(sx + floor (toRational sw*rx)) (sy + floor (toRational sh*ry)) (sx + floor (toRational sw*rx)) (sy + floor (toRational sh*ry))
(floor (toRational sw*rw)) (floor (toRational sh*rh)) (floor (toRational sw*rw)) (floor (toRational sh*rh))
-- TODO seems fishy? -- TODO temporary work around!
-- Urgh. This is required because the fullscreen layout assumes that
-- the focused window will be raised. Hmm. This is a reordering.
-- This really doesn't work with fullscreen mode, where
-- focus is used to find the raised window. moving the floating
-- layer will move focus there, so we now have forgotten the
-- window on the top of the fullscreen
-- --
-- I think the solution must be to track the floating layer separately -- fullscreen mode requires that the focused window in
-- in its own zipper, on each workspace. And from there to -- the tiled layer is raised to the top, just under the floating
-- handle pushing between the two. -- layer. now we don't get 'real unmap' events, unfortunately we
-- get a focus enter event if we delete a window. in fullscreen
-- mode, this will move focus to the next window down in the
-- stack order
-- --
let tiled' = case W.peek this of -- the 'true' solution is to hide windows not visible on the
Just x | x `elem` tiled -> x : delete x tiled -- screen, so they don't get enter events.
_ -> tiled -- to do that, doLayout needs to return a list of windows to
-- raise, and a list to hide.
io $ restackWindows d (flt ++ tiled') --
-- and the only way to remember where focus is on the tiled
-- layer appears to be to track the floating and tiled layers as
-- separate stacks.
--
whenJust (W.peek this) $ io . raiseWindow d
io $ mapM_ (raiseWindow d) (reverse flt)
--
-- this code will cause a delete on the raiseWindow to
-- pass to the last tiled window that had focus.
-- urgh : not our delete policy, but close.
setTopFocus setTopFocus
when logging $ withWindowSet (io . hPrint stdout) when logging $ withWindowSet (io . hPrint stdout)