Bug 494161 - Applications started from krunner always open on the non-focused screen
Summary: Applications started from krunner always open on the non-focused screen
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 6.1.5
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-10-05 10:08 UTC by kde-bugs.m3ae6
Modified: 2025-11-14 03:48 UTC (History)
5 users (show)

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


Attachments
Video of the behavior (1.38 MB, video/webm)
2024-10-05 10:26 UTC, kde-bugs.m3ae6
Details
window behaviour settings (868.24 KB, image/jpeg)
2024-10-30 22:48 UTC, kde-bugs.m3ae6
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kde-bugs.m3ae6 2024-10-05 10:08:25 UTC
SUMMARY
Since switching to KDE 6.1 (Upgrading to Fedora 40), all the application open on the wrong screen, exactly the opposite screen I expect them open in!

STEPS TO REPRODUCE
1. Use a laptop
2. Connect an external screen to it
3. Extend the external screen to the left of the laptop
4. Make the external screen the primary screen.
5. move your mouse to the main screen
6. Open krunner, hopefully it open on the primary screen (where you mouse is) and not the laptop one!
7. open an application, it open on the other screen than krunner was open on!?

OBSERVED RESULT
Application always open on the wrong screen! always the one I am not looking at, always the one I am not interacting with (through the mouse or krunner)!

EXPECTED RESULT
Similar to 5.7, application are open on the focus screen, the screen where the mouse is and / or where the current interaction is happening!
And at login, Primary screen should ALWAYS be the focused screen, not the secondary screen!

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 40 x86_64 6.10.11-200.fc40.x86_64
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
External screen is extending the desktop to the left and is primary.
Laptop screen is secondary monitor.

KDE 5.7 had no issue opening in the correct screen.

Someone seemed to have had a similar issue for ever ago: https://bugs.kde.org/show_bug.cgi?id=393229
All online search ask about activating or deactivating options that do not exist:

```
There's window management settings. The ones you're gonna want to look at are "Active screen follows mouse" in the focus tab and "Window placement" in the advanced tab.
```
- There is no such things as "Window placement" or screen focus option (even when searching the setting)

```
There's also specifically what you're after, "allow kde apps to remember their positions"
```
There is no such option anywhere in the settings or windows rules.

Application tested with the issue:

krunner, firefox, brave, gimp, Dolphin, System settings, steam, ... (all of them)
Comment 1 kde-bugs.m3ae6 2024-10-05 10:26:34 UTC
Created attachment 174445 [details]
Video of the behavior

Adding a video recording of the issue, since Spectacle can record the screen.
Comment 2 S. Bryant 2024-10-30 08:34:53 UTC
The "Active screen follows mouse" setting and behaviour are currently missing.  It's certainly very counter intuitive to have an application appear on a different screen than the launcher that was used to start it.

I'm guessing this is a regression rather than a bug - that it simply hasn't been implemented in 6.x yet.

I would suggest changing the title.  The definition of "wrong screen" is subjective.  The active screen follows the active window but not the mouse.
Comment 3 TraceyC 2024-10-30 17:52:18 UTC
I'm not able to replicate this behavior on Plasma 6.1.5, 6.2.2 or git-master

We need more information to figure out what's happening.
1. Are you using X11 or Wayland?
2. Can you go to Settings - Window management - Window Behavior - Focus and let us know what the setting is for "Window activation policy"?
3. Also do you have a check next to Separate screen focus?

On my systems, I've tested with
Click to focus
Click to focus (mouse precedence)
Separate screen focus is checked

Thanks
Comment 4 kde-bugs.m3ae6 2024-10-30 22:48:33 UTC
Created attachment 175382 [details]
window behaviour settings
Comment 5 kde-bugs.m3ae6 2024-10-30 23:02:35 UTC
(In reply to TraceyC from comment #3)
> I'm not able to replicate this behavior on Plasma 6.1.5, 6.2.2 or git-master
> 
> We need more information to figure out what's happening.
> 1. Are you using X11 or Wayland?
> 2. Can you go to Settings - Window management - Window Behavior - Focus and
> let us know what the setting is for "Window activation policy"?
> 3. Also do you have a check next to Separate screen focus?
> 
> On my systems, I've tested with
> Click to focus
> Click to focus (mouse precedence)
> Separate screen focus is checked
> 
> Thanks

It is using Wayland as it's the default for KDE on Fedora.

I have added the screenshot for the window behaviour settings.

TLDR
- Click to focus
- No such settings exists for separate screen focus (even the search can't find anything)

> I would suggest changing the title.  The definition of "wrong screen" is subjective.

I would agree that it is subjective, but 'expected active screen' is also subjective. The behaviour does not match what I am expecting all the time, so either my expectations are incorrect or the behaviour are incorrect.

>  The active screen follows the active window but not the mouse. 

We are talking about opening a new window, how could the window be active when it does not exist! Kwin decide to open the new window on a screen (always the one not where my eyes expect to see it), then make the window active.

Or kwin have a different definition for active screen between krunner and other windows!

Or kwin decide to switch what is the active screen based once krunner is closed!
Comment 6 Zamundaaa 2025-10-15 20:38:31 UTC
Can you still replicate this issue in Plasma 6.4? It works as expected here
Comment 7 Bug Janitor Service 2025-10-30 03:47:43 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2025-11-14 03:48:15 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.