xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
579 stars 271 forks source link

Fixes/workarounds for Steam client menus/flickering #886

Closed liskin closed 2 months ago

liskin commented 2 months ago

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: https://github.com/ValveSoftware/steam-for-linux/issues/9376 Fixes: https://github.com/xmonad/xmonad/issues/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

liskin commented 2 months ago

Confirmed to work by a couple users, merging then.

paboum commented 2 months ago

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

liskin commented 2 months ago

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 https://github.com/xmonad/xmonad-contrib/pull/825 soon so let's do that and then a release.