Bug 503499 - KDE Connect pointer causes fullscreen presentations to lose focus on Wayland
Summary: KDE Connect pointer causes fullscreen presentations to lose focus on Wayland
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (other bugs)
Version First Reported In: 25.04.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-29 03:27 UTC by Rafael Barbosa
Modified: 2025-06-20 05:10 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Barbosa 2025-04-29 03:27:04 UTC
**Summary:**
When using KDE Connect's "remote control for presentations" pointer on Plasma Wayland, activating the pointer window causes fullscreen presentation windows to lose focus. As a result, the Plasma taskbar becomes visible during fullscreen presentations, breaking the visual experience. This does not happen on X11.

**Steps to reproduce:**
1. Login to a Plasma Wayland session.
2. Open any presentation application (e.g., LibreOffice Impress, Okular) in fullscreen mode.
3. Connect a phone via KDE Connect.
4. Use the "Remote Input" or "Presentation Remote" to activate the pointer.

**Observed behavior:**
- The presentation window loses fullscreen focus.
- The Plasma taskbar becomes visible on top of the presentation.
- Interaction is disrupted, and the presentation looks broken.

**Expected behavior:**
- The presentation window should remain fullscreen and focused.
- The pointer should overlay without stealing window focus or affecting fullscreen.

**Technical analysis:**
- The pointer window is created with `Qt::WindowDoesNotAcceptFocus` and several flags like `Qt::Tool`, `Qt::FramelessWindowHint`, etc.
- However, on Wayland, just creating a new top-level window is enough to cause focus changes.
- Proper Wayland behavior would require using layer-shell protocol (e.g., with a surface layer like overlay/background) or input-inhibition protocols.
- Simply setting window flags is not enough under Wayland security rules.

**Environment:**
- Plasma 6.3.4 / Wayland session
- KDE Connect version: 25.04
- Qt version: 6.9.0
- Distribution: Fedora Linux

**Possible solution:**
- Create the pointer window using layer-shell protocol (Plasma/KWin supports this).
- Alternatively, create a pointer surface that doesn't affect the focus stack.

**Additional information:**
- Problem does not occur under X11.
- Using XWayland for KDE Connect does not fix the issue either.

Thanks for the awesome work on KDE Connect!

P.S.: Analysis done with the help of chatgpt!
Comment 1 luna_kde 2025-06-20 05:10:23 UTC
For related reasons, the presentation remote is completely broken on some other compositors (see this niri issue: https://github.com/YaLTeR/niri/issues/770)

That would also be fixed by using the layer-shell protocol, as suggested here and mentioned in the linked niri issue.

Relevant page about the protocol: https://wayland.app/protocols/wlr-layer-shell-unstable-v1