Bug 498146 - Nextcloud's main window cannot be selected when creating a new KWin rule
Summary: Nextcloud's main window cannot be selected when creating a new KWin rule
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 6.2.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-02 10:28 UTC by Ilya Bizyaev
Modified: 2025-01-02 14:43 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 Ilya Bizyaev 2025-01-02 10:28:06 UTC
SUMMARY
On Wayland, the Nextcloud client's main window appears centered, not next to the system tray indicator, because it cannot set its global coordinates. I wanted to create a KWin rule to manually position the window in the right corner, but the “Detect properties” feature does not let me click Nextcloud's auto-hiding window, not even with a delay.

STEPS TO REPRODUCE
1. Open the KWin rules KCM, create a new one.
2. Set a delay to e.g. 10 seconds, click “Detect window properties”.
3. Click Nextcloud Desktop's system tray indicator.

OBSERVED RESULT
As soon as the timer runs out, Nextcloud's window disappears. My guess is that the detection feature somehow grabs focus, which notifies Nextcloud that it's not the active window anymore.

EXPECTED RESULT
Nextcloud remains the active window while I leisurely select it.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241226
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.11.8-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 David Edmundson 2025-01-02 14:43:59 UTC
>My guess is that the detection feature somehow grabs focus, which notifies Nextcloud that it's not the active window anymore.

Effectively yes, when we're picking a window no-one has focus. This is deliberately added and working as intended.

Generally speaking we don't want Window Rules to apply to things that behave like popups. So because of that I'm not sure it's worth the risk of changing so even though it's a very valid observation, I'll close this ticket.

I would recommend forcing nextcloud to XCB till Wayland protocols get fixed to support positioning properly, then hopefully this will become moot. You can match the rules manually, kwin debug console can show you any details you need.