Bug 489227 - With "focus follows mouse", focus moves to window on another screen when desktop is empty
Summary: With "focus follows mouse", focus moves to window on another screen when desk...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 6.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, regression
Depends on:
Blocks:
 
Reported: 2024-06-26 12:07 UTC by James North
Modified: 2024-06-26 16:22 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 James North 2024-06-26 12:07:32 UTC
SUMMARY
I have three monitors. Ever since 6.1, whenever I try to open an application on an empty desktop, it opens on the wrong monitor. I have Focus Follows Mouse (mouse precedence) set. Despite my cursor being on monitor 1, the application opens on monitor 2.

STEPS TO REPRODUCE
1. Switch to an empty virtual desktop on your primary monitor, or close an application on the current desktop so that it's completely empty, but make sure there's a window on your second monitor. The window may need to be Pinned to all desktops.
2. Open an application with a keyboard shortcut (e.g. your terminal with CTRL+ALT+T)

OBSERVED RESULT
The focus moves to the window on the other monitor once on an empty desktop on monitor 1, and the window opens on the wrong monitor.

EXPECTED RESULT
The window opens on the monitor under my  cursor, which *should* be focused.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch/6.1.0/Wayland
(available in About System)
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Comment 1 Zamundaaa 2024-06-26 13:01:39 UTC
If you enable "separate screen focus" in the window behavior settings, does the issue go away?
Comment 2 James North 2024-06-26 13:05:51 UTC
Nope.
Comment 3 Zamundaaa 2024-06-26 13:25:11 UTC
ah, it only happens with "Focus Follows Mouse (mouse precedence)". Can confirm
Comment 4 James North 2024-06-26 13:42:39 UTC
It also happens with the Focus Follows Mouse option for me (what I was using before this bug started happening).

It even happens with Click to Focus despite the window in the other monitor not being focused when opening the terminal on the wrong monitor.

To reproduce this, here's what I'm doing:

* I am on Virtual Desktop 1.
* Firefox is pinned on Monitor 2. There is another Firefox window on Monitor 1, VD 1.
* I switch to VD 3, which has no windows on monitor 1 but the pinned window on Monitor 2.
* I hit CTRL+ALT+T to bring up my Alacritty terminal, and it appears on Monitor 2 despite the window on Monitor 2 not being visually focused (i.e. the window decorations are grey and faded).

The weird thing is, the window on Monitor 2 *is* visually focused (no grey window decorations) when I perform the same procedure with any Window activation policy but while Separate screen focus is disabled. If it's enabled, the visual focus goes away, but that doesn't seem to mean anything.