Bug 466460 - In plasma wayland session, left click "Screen casting" tray icon shows context menu with title bar in center of the screen
Summary: In plasma wayland session, left click "Screen casting" tray icon shows contex...
Status: CONFIRMED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-26 09:20 UTC by Rocket Aaron
Modified: 2024-01-28 14:38 UTC (History)
6 users (show)

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


Attachments
context menu with title bar in center of the screen (2.33 MB, video/mp4)
2023-02-26 09:21 UTC, Rocket Aaron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rocket Aaron 2023-02-26 09:20:03 UTC
SUMMARY
When using OBS "Screen Capture (Pipewire)" source to record the screen, there would be a "Screen casting" tray icon in the system tray. Left click on the icon would show it's context menu with title bar, in center of the entire screen, rather than next to the tray icon itself. However, right click the tray icon shows it's menu next to the icon as expected.

The "menu" can even be resized by draging the corner, just like a normal window. And it shows "Protal" as title, when resized wide enough.


STEPS TO REPRODUCE
1. In OBS Studio ( https://obsproject.com/download ), add a "Screen Capture (Pipewire)" source
2. In the new "Screen Sharing - Portal" dialog, select any screen to capture, then click "Share", "OK"
3. Once capture started, left click the "Screen casting" tray icon

OBSERVED RESULT
A "context menu" but with title bar, shows in the center of the screen.

EXPECTED RESULT
The menu shows near the tray icon, without title bar.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8+kde+r181-1

ADDITIONAL INFORMATION
Comment 1 Rocket Aaron 2023-02-26 09:21:38 UTC
Created attachment 156752 [details]
context menu with title bar in center of the screen
Comment 2 Nate Graham 2023-02-28 20:54:17 UTC
Needs a parent set, I guess.
Comment 3 Nicolas Fella 2024-01-28 14:38:16 UTC
this is a tricky one. The problem is we are calling show() on the local QMenu in xdg-desktop-portal-kde, but that's not actually the menu that is supposed to be shown on screen, it's just a data container to be passed to KStatusNotifierItem. What we would need is a way to tell KStatusNotifierItem "Act like you were right clicked on"