Bug 466460

Summary: In plasma wayland session, left click "Screen casting" tray icon shows context menu with title bar in center of the screen
Product: [Plasma] xdg-desktop-portal-kde Reporter: Rocket Aaron <i>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aleixpol, bugseforuns, i, jgrulich, materka, nate, nicolas.fella
Priority: NOR    
Version First Reported In: 5.27.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: context menu with title bar in center of the screen

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"
Comment 4 Patrick Silva 2025-05-17 08:05:22 UTC

*** This bug has been marked as a duplicate of bug 502019 ***