#sway #wine #workaround #game #linux #window-manager #blackscreening

app uniconize

A workaround for Wine games blackscreening on sway

2 stable releases

1.0.1 May 10, 2020
1.0.0 Apr 17, 2020

#8 in #workaround

MPL-2.0 license

10KB

uniconize (not a unicorn)

This a is fix for Wine games blackscreening on sway and other tiling window managers that don't support iconized windows.

Installation

Usage

Just run this program! On sway, you'll want to throw exec uniconize somewhere in your configuration. There are no options.

Explanation

i3 and sway are tiling window managers and do not support iconized windows by design. Unfortunately for them, the ICCCM standard says that they must. That said, for native applications, it's fine to ignore iconization requests because, by X11 convention, state will not change until the window manager says so.

However, Windows applications running in Wine are more problematic. On Windows, when the application sets the iconized flag, the window is guaranteed to be iconized, without any feedback from the window manager. Wine can therefore not conform to the convention, and can only blindly assume that the application has been iconized.

This is a problem on i3 and sway, as because they do not support such a state, they have no mechanism to bring a client back from it. And since focusing out of a fullscreen window will immediately iconize it on Windows, games tend to get stuck into that state pretty easily.

As it turns out though, it is sufficient to tell the game that it's been uniconized to bring it back from the dead, without resorting to Wine's virtual desktop. i3 already includes this behavior, but fixing this in sway appears more complicated, so I've opted to write this little program instead.

For more information, please take a look at the following links:

Dependencies

~3MB
~56K SLoC