Bug 490691 - Maximized Apps Ignore the Open Under Mouse Cursor Setting
Summary: Maximized Apps Ignore the Open Under Mouse Cursor Setting
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.1.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-07-23 09:21 UTC by Dashon
Modified: 2024-08-03 03:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dashon 2024-07-23 09:21:52 UTC
SUMMARY
Some wayland apps such as Dolphin and Yakuake seem to ignore the open under mouse setting in system settings. May be related to this bug that was fixed in 6.1.3 https://bugs.kde.org/show_bug.cgi?id=488110
The solution to that other bug report appears to work most of the time. However, I noticed that when switching between virtual desktops using using keyboard shortcuts, scroll wheel, etc. If the mouse is located on my right monitor. Dolphin and Yakuake will open up on the first monitor instead. Most other apps seem to obey the setting though.

Lastly, I have also noticed that Firefox also exhibits this behavior, but it always seems to be doing its own thing.
1. Open system settings -> window management -> window behavior -> advanced tab
2. Set Window Placement to be under mouse.
3. Move mouse to right monitor which in my case is the non primary monitor.
4. Switch virtual desktops with a keyboard shortcut or mouse scroll wheel.

OBSERVED RESULT
Windows open on my primary monitor and not the secondary monitor even though it has the mouse on it, but unlike the other bug report. It doesn't seem to matter what the last active screen was.

EXPECTED RESULT
The window should open under the mouse cursor. Even if it was moved to a different monitor prior to switching to a different virtual desktop.


SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.10-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C95
System Version: 1.0
Comment 1 Nate Graham 2024-07-24 18:54:38 UTC
Cannot reproduce with current git master using those steps.
Comment 2 Dashon 2024-07-25 09:22:25 UTC
(In reply to Nate Graham from comment #1)
> Cannot reproduce with current git master using those steps.

After a bit more testing it appears that in the case of yakuake. If an application is open then yakuake will open on the screen with the active application. 

If I move my mouse to my second monitor and then trigger yakuake with F12, it will open on the second monitor as expected. However, if I trigger it again. It will open on my primary monitor instead. Despite not having moved the mouse. As for dolphin I'll try with a new user.
Comment 3 Dashon 2024-07-25 09:28:29 UTC
(In reply to Nate Graham from comment #1)
> Cannot reproduce with current git master using those steps.

Tried it out with a new user and the issue doesn't occur, so I'm gonna close this issue and start nuking some config files.
Comment 4 Dashon 2024-07-25 10:23:29 UTC
Reopening the issue as I have found the cause even with a new user. The problem is when the window is maximized. They will open on my primary monitor and if they aren't maximized they will open on the monitor with the mouse cursor. 

Tested with dolphin, qt creator, kate, konsole, and gwenview. It seems that for the most part Kirigami based applications don't remember their window size, so they are unaffected by default. However, if you use window rules to force them to remember their maximized state they are also subject to this bug.
Comment 5 Nate Graham 2024-07-25 20:56:15 UTC
I can't reproduce that with Dolphin. However I can reproduce it with Gwenview. Weird.