[xmonad] XMonad is not playing well with floating windows

Chengqi Song songcq at gmail.com
Wed Sep 9 04:08:58 EDT 2009


thanks, will this be merged into next version's xmonad? i'm using xmonad +
xmonad-contrib in archlinux and not really want to change my package;)

lars

On Tue, 08 Sep 2009, Wirt Wolff wrote:

> Excerpts from Massimo Gengarelli's message of Tue Sep 08 02:51:15 -0600 2009:
> > Hi everyone,
> > I'm quite new to XMonad and haskell itself, so I really don't know if
> > it's a problem of my configuration file or it's the default behaviour of
> > XMonad.
> > Everytime I make a window floating, the tiled windows in background swap
> > between themselves, without any reason or fixed rule. If I replace them
> > in the order I want, they re-swap as soon as I move/resize the floated window.
> > I'm using Linux Gentoo and XMonad 0.8.1.
> > Thanks in advance.
> >
> 
> The darcs version of XMonad uses less disruptive method for mousing
> floating windows. You could use the xmonad-contrib-darcs ebuild
> from the haskell overlay (uses xmonad-darcs and haskell
> x11-darcs too). Or copy the following shiftMaster from darcs
> XMonad.StackSet into your xmonad.hs and use the newer mouse
> bindings:
> 
> -- other imports
> import qualified XMonad.StackSet as W
> import qualified Data.Map as M
> 
> -- | /O(s)/. Set the master window to the focused window.
> -- The other windows are kept in order and shifted down on the stack,
> -- as if you just hit mod-shift-k a bunch of times.
> -- Focus stays with the item moved.
> shiftMaster :: StackSet i l a s sd -> StackSet i l a s sd
> shiftMaster = modify' $ \c -> case c of
>     Stack _ [] _ -> c     -- already master.
>         Stack t ls rs -> Stack t [] (reverse ls ++ rs)
> 
> darcsMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
>     [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>                                        >> windows W.shiftMaster))
>     , ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
>     , ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>                                        >> windows W.shiftMaster))
>     ]
> 
> main = xmonad defaultConfig {
>       mouseBindings = darcsMouseBindings
>     -- other changes
>     }
> 
> regards,
> 
> --
> wmw
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad


More information about the xmonad mailing list