Bug 499965 - The mouse pointer switches to the x icon while right-click is held in XWayland-using Chromium/Electron apps
Summary: The mouse pointer switches to the x icon while right-click is held in XWaylan...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.3.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 498512 500277 500736 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-02-13 08:16 UTC by Répási Dávid
Modified: 2025-02-26 23:58 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.2
Sentry Crash Report:


Attachments
browser-right-click (305.53 KB, video/webm)
2025-02-13 08:16 UTC, Répási Dávid
Details
steam (297.13 KB, video/webm)
2025-02-13 08:17 UTC, Répási Dávid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Répási Dávid 2025-02-13 08:16:54 UTC
Created attachment 178252 [details]
browser-right-click

SUMMARY

Seemingly all over the system the cursor randomly switches to the terminate application icon.

STEPS TO REPRODUCE
1. open steam for example
2. fiddle around at the notifications are

1. open this bugreport form
2. right click in the text input field

1. have your mouse cross between an active window and the main panel (this is more random)

OBSERVED RESULT

the cursor switches to the terminate x icon

EXPECTED RESULT

don't have the unnecessary and incorrect cursor switch

SOFTWARE/OS VERSIONS
Linux: 6.13.2
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
happens with breeze and custom cursor theme
wayland
seems to happen when the mouse is going between different components, and doesnt even have to get a signal to change its appearance

(i have put it in the wrong component, sry bout that, that component section could benefit from a search field)
Comment 1 Répási Dávid 2025-02-13 08:17:07 UTC
Created attachment 178253 [details]
steam
Comment 2 Répási Dávid 2025-02-13 08:29:03 UTC
opening https://write.as/new and right clicking in firefox does not net this problem, but in a chromium based browser it happens.
It can also happen in signals input field
Comment 3 Greeniac 2025-02-14 01:45:37 UTC
Can reproduce, I actually had this bug in Fedora KDE a few months ago (Plasma ≈6.1.4), but Arch Linux did not have this bug until Plasma 6.3.
Comment 4 Greeniac 2025-02-14 01:50:16 UTC
(In reply to Greeniac from comment #3)
> Can reproduce, I actually had this bug in Fedora KDE a few months ago
> (Plasma ≈6.1.4), but Arch Linux did not have this bug until Plasma 6.3.

Seems to be an issue with X11 windows in a Wayland session, but I have not done much testing.
Comment 5 Répási Dávid 2025-02-14 12:29:16 UTC
Another way to trigger the bug is by making the panel unresponsive whilst it is touching an x window. When partially covered (ex windows go under) only the part which touches the x window triggers the cursor, but the x cursor will only be visible on the panel, not the xwayland window.
ex:
Using https://github.com/baduhai/Koi to change the system theme by middle clicking it, makes my panel unresponsive whilst the change is happening. While the panel is in that state I can hower over it with my mouse in an area that touches an xwayland window, the bug appears.
Comment 6 Nate Graham 2025-02-18 15:49:19 UTC
Does this happen on X11, or Wayland, or both?

Does it happen in Plasma or any KDE apps?
Comment 7 Nate Graham 2025-02-18 18:19:27 UTC
*** Bug 500277 has been marked as a duplicate of this bug. ***
Comment 8 Greeniac 2025-02-18 18:25:40 UTC
(In reply to Nate Graham from comment #6)
> Does this happen on X11, or Wayland, or both?
> 
> Does it happen in Plasma or any KDE apps?

Doesn't seem like it, seems to only happen with non QT/KDE X11 apps in a Plasma Wayland session, so Chromium/Electron based applications always have this issue (since pretty much all of them only use X11), and GTK/GNOME applications with X11 all have issue. But KDE/QT applications that use X11 like VLC don't have this issue. And all X11 apps work fine in Plasma X11 it's just the Wayland session that has this issue.

Tested with both Flatpak and system packages in Arch Linux and Thumbleweed with two seperate computers (both with an AMD GPU).
Comment 9 Salvatore 2025-02-18 18:46:09 UTC
(In reply to Nate Graham from comment #6)
> Questo accade su X11, Wayland o entrambi?
> 
> Succede in Plasma o in qualsiasi applicazione KDE?

In my experience, at the moment the problem is only on Chrome / Chromium. It did not happen in Plasma 6.2, it has happened since I updated to Plasma 6.3 (Arch Linux)
Comment 10 Nate Graham 2025-02-18 21:43:03 UTC
I can reproduce the issue in a Wayland session with Chromium and VS Code. Interestingly enough, I cannot reproduce it with Discord which is also Electron-based.
Comment 11 Greeniac 2025-02-18 23:56:21 UTC
(In reply to Nate Graham from comment #10)
> I can reproduce the issue in a Wayland session with Chromium and VS Code.
> Interestingly enough, I cannot reproduce it with Discord which is also
> Electron-based.

Maybe with their work to make wayland screen recording work somehow fixed it?
Comment 12 Garfield 2025-02-19 10:23:33 UTC
I can confirm I had the same issue with vscode running under xwayland but after forcing it to use wayland the problem disappears.
Comment 13 Bug Janitor Service 2025-02-19 12:00:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5229
Comment 14 Tim B. 2025-02-19 12:44:13 UTC
I have the same problem with latest chromium-browser and leafpad-editor.
Comment 15 Vlad Zahorodnii 2025-02-19 12:48:26 UTC
Git commit 89f99b2fa8770431b64ef19fb9ecc48628cdeac8 by Vlad Zahorodnii.
Committed on 19/02/2025 at 12:21.
Pushed by vladz into branch 'master'.

kcms/krdb: Wait until root window cursor is set

It looks like the X server may not process queued requests from a client
if it disconnects. In order to address that, this change makes krdb wait
until the root window cursor is set and only then terminate the temporary
connection.

M  +5    -1    kcms/krdb/krdb.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/89f99b2fa8770431b64ef19fb9ecc48628cdeac8
Comment 16 Tim B. 2025-02-19 12:49:48 UTC
(In reply to Tim B. from comment #14)
> I have the same problem with latest chromium-browser and leafpad-editor.
just since update to kde 6.3, wayland-only, x11 is ok
Comment 17 Vlad Zahorodnii 2025-02-19 13:15:09 UTC
Git commit 1d7c6e3ecfaff1b1cf8c0229db174705a4761dfe by Vlad Zahorodnii.
Committed on 19/02/2025 at 12:53.
Pushed by vladz into branch 'Plasma/6.3'.

kcms/krdb: Wait until root window cursor is set

It looks like the X server may not process queued requests from a client
if it disconnects. In order to address that, this change makes krdb wait
until the root window cursor is set and only then terminate the temporary
connection.


(cherry picked from commit 89f99b2fa8770431b64ef19fb9ecc48628cdeac8)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +5    -1    kcms/krdb/krdb.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/1d7c6e3ecfaff1b1cf8c0229db174705a4761dfe
Comment 18 Greeniac 2025-02-19 13:21:05 UTC
(In reply to Vlad Zahorodnii from comment #15)
> Git commit 89f99b2fa8770431b64ef19fb9ecc48628cdeac8 by Vlad Zahorodnii.
> Committed on 19/02/2025 at 12:21.
> Pushed by vladz into branch 'master'.
> 
> kcms/krdb: Wait until root window cursor is set
> 
> It looks like the X server may not process queued requests from a client
> if it disconnects. In order to address that, this change makes krdb wait
> until the root window cursor is set and only then terminate the temporary
> connection.
> 
> M  +5    -1    kcms/krdb/krdb.cpp
> 
> https://invent.kde.org/plasma/plasma-workspace/-/commit/
> 89f99b2fa8770431b64ef19fb9ecc48628cdeac8

Vlad, thank you! for fixing pretty much all of the bugs that made my Plasma experience less than ideal.
And thanks to Nate Graham and the rest of the KDE team for all of the work!
Comment 19 Nate Graham 2025-02-26 23:57:50 UTC
*** Bug 500736 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2025-02-26 23:58:39 UTC
*** Bug 498512 has been marked as a duplicate of this bug. ***