Issue 325 in xmonad: Layout.Spacing breaks Layout.WindowNavigation

Status: New Owner: ---- New issue 325 by OrbisVicis: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 Removing the spacing modifier in the layoutHook or setting "spacing 0" fixes the problem. Symptoms: While Go or Swap *might* initially work, they very quickly lock up and do nothing. -- 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

Updates: Labels: Component-Contrib Type-Defect Comment #1 on issue 325 by vogt.adam: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 What order do you compose the two layouts? Is this with a minimal config? I can't reproduce this, but maybe that's because you're doing something different in your config. -- 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

Comment #2 on issue 325 by OrbisVicis: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 This is my config Attachments: xmonad.hs 21.3 KB -- 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

Comment #3 on issue 325 by OrbisVicis: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 Does not occur if spacing is applied after WindowNavigation -- 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

Comment #4 on issue 325 by byorgey: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 I can't reproduce this either, no matter which order I apply them in. Can you try cutting things down to a minimal config that still exhibits the problem? -- 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

Comment #5 on issue 325 by OrbisVicis: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 Actually, the attached configuration will exhibit the problem. I've also managed to reproduce the error in XMonad from darcs, though only with OneBig and Spiral. Try this config, which is in spiral by default. Move the mouse over the master area, so that each new window will be placed in the master and receive focus, and then open five windows. The focus should still be in the master. Navigation using the WindowNavigation bindings should be impossible. If it is, try reloading the config, again... and again. It's reproducible 100% for me. If the windows are spawned differently, WindowNavigation might work, but will probably skip some windows, and probably eventually lock up. Attachments: xmonad.hs 3.2 KB -- 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

Updates: Status: Accepted Labels: Priority-Low Comment #6 on issue 325 by vogt.adam: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 I can reproduce the failure of L.WindowNavigation to find a window to go to. If you change the focus some other way once, then you never get stuck again (or at least until you reset windowNavigation's state). As before, if you apply spacing after windowNavigation there is no problem. -- 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

Comment #7 on issue 325 by damian.only: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 For me it doesn't matter if spacing is applied after, the WindowNavigation doesn't behave properly. For instance I have the following configuration: longMaster = windowNavigation (Tall 1 (3/100) (3/5)) consoleLayout = spacing 10 longMaster ||| spacing 10 ( Mirror longMaster ) And the window navigation works fine for the first layout, but it fails in the mirrored mode. -- 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

Comment #8 on issue 325 by vogt.adam: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 Well try this instead for your second layout:
secondLayout = spacing 10 $ Mirror $ windowNavigation $ Tall 1 (3/100) (3/5)
Note that `Mirror' and `spacing n' are very similar in that they significantly adjust the rectangles given to windows, so you need to apply those ones after windowNavigation. But while the problem with spacing could probably be worked around in changes to windowNavigation, maybe a better way is to apply layout modifiers in such a way that avoids those conflicts:
import Data.Ord import Data.List import XMonad import XMonad.Layout.Spacing as S import XMonad.Layout.WindowNavigation
type Precedence = Int type LM a = (Layout a -> Layout a, Precedence)
applyModifiers :: (LayoutClass l a, Read (l a)) => [LM a] -> (l a -> Layout a) applyModifiers lms l = foldr ($) (Layout l) $ map fst $ sortBy (comparing snd) lms
xmonad' :: XConfig Layout -> IO () xmonad' x@XConfig{layoutHook = Layout l} = xmonad x{layoutHook = l}
mirror = (\(Layout a) -> Layout (Mirror a),1) spacing' n = (\(Layout a) -> Layout (spacing n a),1) nav = (\(Layout a) -> Layout (windowNavigation a),0)
Example:
main = xmonad' { layoutHook = applyModifiers [nav,spacing' 5,mirror] Full }
But perhaps the sort could be done at the type-level, and possibly using hlists... -- 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

Comment #9 on issue 325 by awwaiid: Layout.Spacing breaks Layout.WindowNavigation http://code.google.com/p/xmonad/issues/detail?id=325 I had this problem (when master has the first focus, WindowNavigation does nothing. When a child has first focus, WindowNavigation works fine). I switched the order of my layout so that spacing is applied after WindowNavigation and it fixed it! Thanks!
participants (1)
-
codesite-noreply@google.com