https://bugs.kde.org/show_bug.cgi?id=489135

            Bug ID: 489135
           Summary: Some native Wayland fullscreen applications start at
                    wrong screen
    Classification: Plasma
           Product: kwin
           Version: 6.1.0
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: multi-screen
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
In multi-monitor setup, some native Wayland clients are starting fullscreen on
a screen other than primary (see the attachment). Notable examples are:
1. SDL2 apps with SDL_VIDEODRIVER=wayland (not SDL3 apps though)
2. GLFW apps
3. Telegram Desktop


STEPS TO REPRODUCE
1. Assemble a multi-monitor setup
2. Configure desired primary display
3. Try to launch some SDL2/GLFW game in fullscreen with Wayland backend

OBSERVED RESULT
Game most likely will go fullscreen on a screen other than primary (it can go
to the primary screen, but that's not guaranteed).

EXPECTED RESULT
Game should start fullscreen on the screen I've configured as primary in
Display Settings.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.6-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 15.6 ГиБ of RAM
Graphics Processor: AMD Radeon RX 6700 XT

ADDITIONAL INFORMATION
The root of the problem is that Wayland has no concept of a primary screen.
Without that concept, applications try to guess which screen would be primary,
and so they pick the first reported wl_output. Since reported order of
wl_outputs doesn't mean anything in reality (as was explained here
https://bugs.kde.org/show_bug.cgi?id=488963) applications end up on a wrong
screen. I see three possible solutions for this problem:
1. Every possible Wayland client should implement "kde_output_order_v1"
protocol (like SDL3 did).
2.
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/242
should be merged and implemented in both KWin and clients.
3. KWin should reorder reported wl_outputs and always put primary screen as a
first reported wl_output.
I see the third option as the most realistic one.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to