This program is no longer needed because wlroots and sway have gained the necessary functionality to fix the problem on their own. 🥳
This a is fix for Wine games blackscreening on sway and other tiling window managers that don't support iconized windows.
- Manual: with a recent Rust toolchain and a fresh clone of this repo,
cargo install --path .
- crates.io:
cargo install uniconize
- Arch Linux: AUR package
uniconize
- Nixpkgs: NUR package
pkgs.nur.repos.nexromancers.uniconize
- Other distros: make a pull request to add your package or build script!
Just run this program! On sway, you'll want to throw exec uniconize
somewhere
in your configuration. There are no options.
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: