Bug 505104

Summary: Spawned window from an app does not spawn in the same monitor as the app
Product: [Plasma] kwin Reporter: dougg0k
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dougg0k 2025-06-01 20:25:49 UTC
SUMMARY
For whatever reason, window which are spawned by an application, let's say a Save file window from a browser, it does not spawn in the place where that browser is placed on. Like If I have the browser in the second monitor, it spawn the window in the first monitor.

If I have a video or application open in the other, it just spawn above it. Regardless.

It's not exclusive to the save file window in a browser.

The issue might not be exclusive to wayland.

STEPS TO REPRODUCE
1. Open a browser
2. Save a file with the browser in the second monitor

OBSERVED RESULT
Window spawned by an app does not spawn in the same monitor where the app are placed upon.

EXPECTED RESULT
Window should spawn in the same screen / monitor where the app that spawned it, are.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
Comment 1 dougg0k 2025-06-01 20:32:42 UTC
This is about the child spawned window being in the same monitor as the app that spawned it are, even if not focused / active.
Comment 2 Zamundaaa 2025-06-02 12:58:33 UTC
This depends on the application setting the parent window correctly. If it does, then the child gets centered above the parent. If it doesn't, there's quite simply nothing we can do.
Comment 3 dougg0k 2025-06-02 13:10:22 UTC
Whatever window has the KDE logo, like the one from this website, it seems to somewhat follow the Window activation policy, rather than stay where the app are. 

So, by having something active in another monitor, it usually follows it.

There should be a way to set a specific setting for dialog like window.
Comment 4 dougg0k 2025-06-02 13:24:43 UTC
Actually, it just seem to go where the mouse cursor is.

I tried focus stealing prevention - extreme (general), and just for dialog window in window rules. Resulted in the same.
Comment 5 dougg0k 2025-06-02 13:30:45 UTC
I tried detecting the window properties, resulted in - xdg-desktop-portal-kde org.freedesktop.impl.portal.desktop.kde

I then tried to force the position x to the monitor where the app are, even then, the window continued opening where th cursor are, regardless.
Comment 6 dougg0k 2025-06-02 13:40:24 UTC
I tried some other dialog like window from other apps, besides browser. 

- VLC, it always go to the second monitor regardless of mouse or app placement.
- Dolphin, if you go to the title bar and press right click > more actions and choose an option, it will do the exact same as the dialog, be placed where the mouse cursor is - kcm_kwinrules
- Some other apps that have their own implementation, seem to spawn where their app are.

Appears to be a KDE related issue.
Comment 7 Vlad Zahorodnii 2025-06-02 14:15:24 UTC
(In reply to dougg0k from comment #6)
> I tried some other dialog like window from other apps, besides browser. 
> 
> - VLC, it always go to the second monitor regardless of mouse or app
> placement.
> - Dolphin, if you go to the title bar and press right click > more actions
> and choose an option, it will do the exact same as the dialog, be placed
> where the mouse cursor is - kcm_kwinrules

That window is not a dialog. Perhaps it should be. Either way, it's a separate issue.

> - Some other apps that have their own implementation, seem to spawn where
> their app are.
> 
> Appears to be a KDE related issue.

Are there any other examples of KDE applications that have misplaced dialogs?
Comment 8 dougg0k 2025-06-02 14:53:26 UTC
I checked a few more.

Most that seem to have their own implementation and GNOME, all stay in the same place where their app are.

kcm_kwallet5, Configure Wallet, seem to have the same behavior.

I think the pattern noticed, might be how fast the dialog spawn. If somewhat slow, and the mouse quickly change monitor or that being active, it goes there. 
Another one noticed, some dialog seem faster even if has more functionality, but gave the feeling that it spawned where the mouse click originated from, regardless of the condition like mouse quickly moving to the other screen or having an app active there, which could be taking priority as the active screen, like fullscreen ones.
Comment 9 Bug Janitor Service 2025-06-17 03:47:47 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 10 dougg0k 2025-06-17 22:15:38 UTC
Already gave the info.