Bug 489271 - applications don't open on primary monitor when taskbar is empty
Summary: applications don't open on primary monitor when taskbar is empty
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: git master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-06-27 00:31 UTC by Ravi
Modified: 2024-06-27 22:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ravi 2024-06-27 00:31:02 UTC
I have two monitors, and the primary one is to the right.

When there are no windows opened or all the windows are minimized, opening applications with a keyboard shortcut makes the application open on the secondary monitor, even though the mouse is on the primary. If you move the mouse or click on the empty desktop before opening the application, it will spawn in the correct monitor (primary) once, but if you close it and open it again, it will open on the wrong monitor. Examples: showing/hiding yakuake, opening/closing dolphin.

STEPS TO REPRODUCE
1. Have no windows opened, or all windows minimized for that virtual desktop. Mouse on the primary monitor
2. Do not move the mouse
3. Open an application via a keyboard shortcut
4. Close application with the keyboard. Try opening it again via shortcut

OBSERVED RESULT
Application will open on secondary monitor

EXPECTED RESULT
Application should have opened on primary monitor, where the mouse cursor was.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux, kernel 6.9.4, Plasma 6.2 dev
(available in About System)
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Running on wayland

ADDITIONAL INFORMATION
I think this started happening somewhere between plasma 6.0 and 6.1.

This happens with a fresh user account as well.

Secondary monitor is DP-1 and primary monitor is DP-2. Maybe it has something to do with that.
Here is the result of running kscreen-doctor --outputs:

Output: 1 DP-1
        enabled
        connected
        priority 2
        DisplayPort
        Modes:  0:2560x1440@60!  1:2560x1440@165*  2:2560x1440@144  3:2560x1440@120  4:2560x1440@100  5:2560x1440@85  6:2560x1440@24  7:1024x768@60  8:800x600@60  9:640x480@60 
        Geometry: 0,205 2048x1152
        Scale: 1.25
        Rotation: 1
        Overscan: 0
        Vrr: Automatic
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
Output: 2 DP-2
        enabled
        connected
        priority 1
        DisplayPort
        Modes:  0:2560x1440@60!  1:2560x1440@165*  2:2560x1440@144  3:2560x1440@120  4:2048x1152@60  5:1920x1200@60  6:1920x1080@120  7:1920x1080@60  8:1920x1080@60  9:1920x1080@50  10:1920x1080@24  11:1600x1200@60  12:1680x1050@60  13:1280x1024@75  14:1280x1024@60  15:1280x800@60  16:1152x864@75  17:1280x720@60  18:1280x720@50  19:1024x768@75  20:1024x768@60  21:800x600@75  22:800x600@60  23:720x576@50  24:720x480@60  25:640x480@75  26:640x480@60  27:640x480@60 
        Geometry: 2048,0 2048x1152
        Scale: 1.25
        Rotation: 1
        Overscan: 0
        Vrr: Automatic
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
Comment 1 Nate Graham 2024-06-27 20:42:47 UTC
Monitor primary-ness doesn't determine where windows open. Rather, this is generally determined by which monitor the cursor is on.
Comment 2 Ravi 2024-06-27 22:23:31 UTC
but the cursor is on the primary monitor, and yet all windows open on the secondary monitor unless I move the mouse right before opening them
Comment 3 Ravi 2024-06-27 22:33:14 UTC
I was trying to record my screen and I believe I found the culprit!
It seems that xwaylandvideobridge auto-loads if it is installed, but if I close it, the behavior disappears!