Bug 490666 - "Remote control requested" dialog shows up after clicking on the tray icon of certain apps
Summary: "Remote control requested" dialog shows up after clicking on the tray icon of...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: XembedSNIProxy (show other bugs)
Version: 6.1.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-22 19:59 UTC by Patrick Silva
Modified: 2024-10-02 22:55 UTC (History)
11 users (show)

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


Attachments
screenshot (20.31 KB, image/png)
2024-07-22 19:59 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2024-07-22 19:59:25 UTC
Created attachment 171904 [details]
screenshot

SUMMARY
I can reproduce this bug on my system with jdownloader (java app), tv-browser (java app) and uGet download manager (gtk app).

STEPS TO REPRODUCE
1. run any affected app mentioned above
2. left/right click on the tray icon of the app
3. 

OBSERVED RESULT
the dialog seen in the attached screenshot shows up

EXPECTED RESULT
remote control should not be requested after the provided steps

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Graphics Platform: Wayland
Comment 1 Patrick Silva 2024-07-22 20:03:03 UTC
BiglyBT torrent client (java app) is also affected.
Comment 2 Nicolas Fella 2024-07-26 13:47:06 UTC
What happens is this:

These applications use legacy xembed tray icons. Our xembedsniproxy uses XTest to send events to the application. Since recently XWayland translates XTest requests to remote desktop portal requests, triggering the prompt
Comment 3 TONKAHANAH 2024-07-28 16:38:28 UTC
Im also seeing the dialog with game controllers. I have one connected via a 2.4ghz usb adapter and bluetooth, both prompt this dialog box to popup.

not sure if its exactly the same issue then but I keep getting this same dialog coming up and it only started doing this maybe a few weeks ago. If I click cancel, it'll popup again when I send any kind of input from the controller (any button, stick movement, trackpad input). If I hit "share" it has a like a 1/3 chance to completely lock up the display and I need to force reboot (cant get to any tty) 

the controller will continue to be detected and work through kde but steam (and I suspect the games) wont be able to take the inputs unless I hit share.
Comment 4 Darius Moore 2024-07-28 17:53:10 UTC
I'm encountering the same issue, while using Wireguird & JDownloader2 (GTK apps).
What I've also noticed is that once the access is given, clicking it will not sent the click event to the app, instead the tray item will be stuck in clicked action.
And if I hover over an item which supports clicking/activating, it sends the click to that one.

And randomly & very rarely, I can actually get the mouse action to go through. I can't reproduce how, so far.
Comment 5 Patrick Canal 2024-07-28 18:05:13 UTC
I have the same issue when issue when using my Playstation 4 controller: https://bugs.kde.org/show_bug.cgi?id=490509
Comment 6 Mat Taniguchi 2024-07-29 07:36:49 UTC
It first started happening to me when I used Steam remote play with my Linux machine as the host. I use Fedora 40 KDE, Wayland.

I have a Dualsense controller, using it via Bluetooth never triggers it.
Comment 7 David Edmundson 2024-07-29 09:06:39 UTC
>. Our xembedsniproxy uses XTest to send events to the application

Just to clarify that, we have two paths. One uses xtest one does not. 

The xtest path is more of a hack, at the time for just GTK3. If anyone can test  commenting out:

plasma-workspace/xembedsniproxy/sniproxy.cpp
```
    if (windowAttributes && !(windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS)) {
        m_injectMode = XTest;
    }
```

and see if clicking their app still works that would be useful. We can try and make the xtest path less used.
Comment 8 Bug Janitor Service 2024-07-29 10:03:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4565
Comment 9 Bug Janitor Service 2024-07-29 10:55:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/303
Comment 10 David Redondo 2024-07-29 11:35:15 UTC
Git commit 4f82c43d4091abbd36a4e446d887344677e32d6a by David Redondo.
Committed on 29/07/2024 at 10:50.
Pushed by davidre into branch 'master'.

remotedesktop: Only show the restore checkbox if the app wants to persist

Otherwise it promises to do something that will not happen.

M  +1    -0    src/RemoteDesktopDialog.qml
M  +1    -1    src/remotedesktop.cpp
M  +2    -1    src/remotedesktopdialog.cpp
M  +2    -1    src/remotedesktopdialog.h

https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/4f82c43d4091abbd36a4e446d887344677e32d6a
Comment 11 Bug Janitor Service 2024-07-29 11:36:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/304
Comment 12 David Redondo 2024-07-29 11:38:05 UTC
Git commit 2fa4cb52313b8a4d91d3525b398f7419d96ce9c6 by David Redondo.
Committed on 29/07/2024 at 11:35.
Pushed by davidre into branch 'Plasma/6.1'.

remotedesktop: Only show the restore checkbox if the app wants to persist

Otherwise it promises to do something that will not happen.


(cherry picked from commit 4f82c43d4091abbd36a4e446d887344677e32d6a)

Co-authored-by: David Redondo <kde@david-redondo.de>

M  +1    -0    src/RemoteDesktopDialog.qml
M  +1    -1    src/remotedesktop.cpp
M  +2    -1    src/remotedesktopdialog.cpp
M  +2    -1    src/remotedesktopdialog.h

https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/2fa4cb52313b8a4d91d3525b398f7419d96ce9c6
Comment 13 David Redondo 2024-07-29 12:48:58 UTC
Git commit b0f3f954021280bfe21d4f36bec0279620c860cd by David Redondo.
Committed on 29/07/2024 at 12:29.
Pushed by davidre into branch 'master'.

xembed-sni-proxy: Check if descendant windows want button events

This notably fixes some Java apps where the embedded window
is not intrested in button events but a child is.

M  +19   -1    xembed-sni-proxy/sniproxy.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/b0f3f954021280bfe21d4f36bec0279620c860cd
Comment 14 Bug Janitor Service 2024-07-29 14:16:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4566
Comment 15 David Redondo 2024-07-29 14:41:17 UTC
Git commit bf145579129e363cf14064bb369260c303b9ae23 by David Redondo.
Committed on 29/07/2024 at 14:16.
Pushed by davidre into branch 'Plasma/6.1'.

xembed-sni-proxy: Check if descendant windows want button events

This notably fixes some Java apps where the embedded window
is not intrested in button events but a child is.


(cherry picked from commit b0f3f954021280bfe21d4f36bec0279620c860cd)

Co-authored-by: David Redondo <kde@david-redondo.de>

M  +19   -1    xembed-sni-proxy/sniproxy.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/bf145579129e363cf14064bb369260c303b9ae23
Comment 16 Aidan Harris 2024-08-09 01:31:40 UTC
I'm still seeing this issue as well as broken clicks on icons in GTK apps. I use ibus-ui-gtk3 as an IME which I use because I prefer it over Fcitx. I keep hoping KDE will one day add iBus support of its own with a Plasmoid and candidate selection menu that's Breeze themed and integrates well with the desktop. I think that's what kimpanel is supposed to do but I've never got it to work as well as ibus-ui-gtk3, maybe I'm doing something wrong?. Anyway, long story short the ibus-ui-gtk3 systray is completely broken with xembed-sni-proxy, it used to work fine though.

I found a really good workaround in Stalonetray:
https://wiki.archlinux.org/title/Stalonetray

Amazingly, this just works and implements a standalone systray for Xembed apps with none of the limitations of xembed-sni-proxy. I use the following command to launch it which places it at the top of my second display and allows windows to cover it:

stalonetray --window-type normal --window-layer normal --background '#2d3134' --geometry 10x1+3840-1600
Comment 17 David Edmundson 2024-10-02 22:11:56 UTC
Git commit 0dcc0e40f947594d4b59b4d2d57461a5ea31f9c1 by David Edmundson.
Committed on 02/10/2024 at 22:11.
Pushed by davidedmundson into branch 'master'.

xembedsniproxy: Leave real window active during event dispatch

With the new libei integration a click on an xmebedsiproxy item
that uses xtest there is a roundtrip through kwin and back.

We need to then put a delay so the window remains until that hits.

Tested with Skype

M  +14   -1    xembed-sni-proxy/sniproxy.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/0dcc0e40f947594d4b59b4d2d57461a5ea31f9c1
Comment 18 Bug Janitor Service 2024-10-02 22:12:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4782
Comment 19 Bug Janitor Service 2024-10-02 22:28:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4783
Comment 20 David Edmundson 2024-10-02 22:55:16 UTC
Git commit bb71b6257f89d29b90008e3c4df62094fe2446d9 by David Edmundson, on behalf of David Edmundson.
Committed on 02/10/2024 at 22:28.
Pushed by davidedmundson into branch 'Plasma/6.2'.

xembedsniproxy: Leave real window active during event dispatch

With the new libei integration a click on an xmebedsiproxy item
that uses xtest there is a roundtrip through kwin and back.

We need to then put a delay so the window remains until that hits.

Tested with Skype


(cherry picked from commit 0dcc0e40f947594d4b59b4d2d57461a5ea31f9c1)

29665403 xembedsniproxy: Leave real window active during event dispatch

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +14   -1    xembed-sni-proxy/sniproxy.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/bb71b6257f89d29b90008e3c4df62094fe2446d9