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

Fixes/workarounds for Steam client menus/flickering #886

Merged
merged 5 commits into from
Apr 28, 2024

Conversation

liskin
Copy link
Member

@liskin liskin commented Apr 27, 2024

Description

A fix, a tool for workarounds, and a workaround:

X.H.EwmhDesktops: Fix menus in Steam client

More specifically, ignore ClientMessageEvents for unmanaged windows. Steam likes to send _NET_ACTIVE_WINDOW requests for all its windows, including override-redirect ones, which used to result in an invocation of windows with a no-op Endo—equivalent to a call to refresh. But this refresh makes Steam close its menus immediately.

Fixes: ValveSoftware/steam-for-linux#9376
Fixes: xmonad/xmonad#451

X.H.FloatConfigureReq: New module to customize ConfigureRequest handling

Implements a replacement event handler for ConfigureRequestEvent to work around misbehaving client applications such as Steam, rxvt-unicode and others that try to restore their absolute window positions. Primarily motivated by the Steam client being almost completely unusable in xmonad lately.

(I've been running this code in my xmonad.hs for other purposes for years.)

X.H.FloatConfigureReq: Add fixSteamFlicker

For ease of use, provide fixSteamFlicker as a pre-packaged floatConfReqHook that can easily be added directly to a handleEventHook.

Also, for discoverability, re-export it from X.U.Hacks.

Checklist

  • I've read CONTRIBUTING.md

  • I've considered how to best test these changes (property, unit, manually, ...) and concluded:
    been running the X.H.FloatConfigureReq stuff for years locally; the rest is fresh and ideally needs to be manually tested by some folks

  • I updated the CHANGES.md file

liskin added 5 commits April 28, 2024 19:37
More specifically, ignore ClientMessageEvents for unmanaged windows.
Steam likes to send _NET_ACTIVE_WINDOW requests for all its windows,
including override-redirect ones, which used to result in an invocation
of `windows` with a no-op Endo—equivalent to a call to `refresh`. But
this refresh makes Steam close its menus immediately.

Fixes: ValveSoftware/steam-for-linux#9376
Fixes: xmonad/xmonad#451
Implements a replacement event handler for 'ConfigureRequestEvent' to
work around misbehaving client applications such as Steam, URxvt and
others that try to restore their absolute window positions. Primarily
motivated by the Steam client being almost completely unusable in xmonad
lately.

(I've been running this code in my xmonad.hs for other purposes for
years.)
For ease of use, provide `fixSteamFlicker` as a pre-packaged
`floatConfReqHook` that can easily be added directly to a
`handleEventHook`.

Also, for discoverability, re-export it from X.U.Hacks.
@liskin
Copy link
Member Author

liskin commented Apr 28, 2024

Confirmed to work by a couple users, merging then.

@liskin liskin merged commit 700507f into xmonad:master Apr 28, 2024
18 checks passed
@liskin liskin deleted the steam-fixes branch April 28, 2024 17:39
@paboum
Copy link

paboum commented Apr 29, 2024

I will test it when it gets into gentoo portage. Hopefully 0.18.1?

@liskin
Copy link
Member Author

liskin commented Apr 29, 2024

I will test it when it gets into gentoo portage. Hopefully 0.18.1?

Suppose this is an important enough fix to make a release. I was going to look at #825 soon so let's do that and then a release.

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