xmonad/xmonad

Floating window sliding towards bottom right

Soupstraw opened this issue · 2 comments

Problem Description

When I have window borders enabled and run a program that starts in a floating window, the window starts sliding diagonally in the bottom-right direction.

Steps to Reproduce

  • Load the configuration file provided below
  • Launch some program that launches in a floating window (e.g. steam login prompt)
  • Watch as the window escapes out the bottom-right corner of the screen

Configuration File

import XMonad hiding (float)
import XMonad.Config.Desktop
import XMonad.StackSet

myConfig = def
  { borderWidth = 3
  }


main :: IO ()
main = xmonad myConfig

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version 0.17.1
    • With xmonad-contrib version 0.17.1

Oh, the joy of broken software that expects a reparenting WM… This should be reported to Steam.

I've had a workaround for Steam insisting on moving its floats in my xmonad.hs for a while which I've been meaning to upstream into xmonad-contrib but can't find the time to do it unfortunately:
https://github.com/liskin/dotfiles/blob/743c499907eb3fa031e6a9eb2f94f191495a9ac6/.xmonad/xmonad.hs#L300-L327
https://github.com/liskin/dotfiles/blob/743c499907eb3fa031e6a9eb2f94f191495a9ac6/.xmonad/xmonad.hs#L273-L278
https://github.com/liskin/dotfiles/blob/743c499907eb3fa031e6a9eb2f94f191495a9ac6/.xmonad/xmonad.hs#L292

Also, it's a massive hack compensating for the absence of a hook in

xmonad/src/XMonad/Main.hs

Lines 388 to 398 in 3d8238b

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
, wc_y = ev_y e
, wc_width = ev_width e
, wc_height = ev_height e
, wc_border_width = fromIntegral bw
, wc_sibling = ev_above e
, wc_stack_mode = ev_detail e }
when (member w ws) (float w)

Yeah, I think I'll stick to leaving the border width to the default value, which seems to work around this issue for the time being.