Wayland fullscreen windows open on secondary display
Affected version
Fedora 38 + Mutter 44.1 + Wayland
Bug summary
After upgrading to Fedora 38, fullscreen apps running under Wayland (games mostly) no longer open on the display marked as "primary" in Gnome Settings. On Fedora in particular they've changed the default windowing driver for SDL to be Wayland. So all native installed games through repositories or Flatpak are all affected. Most games default to launch in fullscreen, and few allow you to select the destination display. A few can't toggle fullscreen without relaunching, so it's impossible to use fullscreen on the correct display. Setting the primary display seems to be the only way to hint which display you want to use for fullscreen content. I did try swapping the physical display connections in case it was simply defaulting the first port index or something, but it still picks the secondary display.
It might be worth describing my setup as well. I have a 1080p 144hz display that I use as my primary and a 4k 60hz display for my secondary. The 4k is great for text and photo editing, but not much else (performance, refresh rate, response time, etc). It seems quite possible that Mutter is simply picking the highest resolution display for some reason.
On a personal note, I prefer using Wayland when developing my own games for various benefits. Though right now it's very problematic since launching my game into fullscreen was the only dependable way to have it placed on the correct display. (I can't specify initial window placement with Wayland. Unclear if this is a Wayland or SDL issue though.)
XWayland apps aren't affected.
Steps to reproduce
I have two displays, a 1080@144hz and 4k@60hz.
- Mark the 144hz display as my primary in Gnome Settings
- Note that the Gnome top bar shows up on the correct monitor
- Launch any game/application that opens directly into a fullscreen window
- Here is a small-ish example if you need one (https://flathub.org/apps/org.nongnu.enigma)
What happened
The game opens on the secondary display instead of the primary one.
What did you expect to happen
Fullscreen applications should launch on the primary display.
Relevant logs, screenshots, screencasts etc.
N/A