XMonad is not playing well with floating windows

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.
--
Massimo Gengarelli

On Tue, Sep 8, 2009 at 12:51 PM, Massimo
Gengarelli
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 guess it's another instance of this: http://code.google.com/p/xmonad/issues/detail?id=4

massimo.gengarelli:
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.
It's a consequence of the single focus model of tiling, with a fullscreen background. See bug 4. -- Donn

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

Ugh, sorry for pressing send too soon. You'll need 'W.' for the imports from StackSet: shiftMaster = W.modify' $ \c -> case c of W.Stack _ [] _ -> c -- already master. W.Stack t ls rs -> W.Stack t [] (reverse ls ++ rs) -- wmw

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@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi, I've emerged xmonad-darcs and all the other stuffs (xmonad-contrib-darcs ..) and now it's working fine, as I expected. Thanks ;) Another thing, when I have two windows floating in a tag one stays always on top, and to bring the other one up I've to click in it, is it possible to bring it up just by switching to it using M-j/k ? The problem is that I've a very small screen (1024x600), and sometimes this is a problem for me.. Thanks in advance. On Tue, Sep 08, 2009 at 08:12:56AM -0600, Wirt Wolff wrote:
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: [snip]
--
Massimo Gengarelli
participants (6)
-
Chengqi Song
-
Don Stewart
-
Konstantin Sobolev
-
Massimo Gengarelli
-
wagnerdm@seas.upenn.edu
-
Wirt Wolff