Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating window sliding towards bottom right #423

Open
3 tasks done
Soupstraw opened this issue Oct 9, 2022 · 2 comments
Open
3 tasks done

Floating window sliding towards bottom right #423

Soupstraw opened this issue Oct 9, 2022 · 2 comments

Comments

@Soupstraw
Copy link

Soupstraw commented Oct 9, 2022

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
@liskin
Copy link
Member

liskin commented Oct 9, 2022

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)

@Soupstraw
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants