Bug 483557 - Right clicking on panel when not focused on the desktop after switching monitors causes the context menu to open in a window
Summary: Right clicking on panel when not focused on the desktop after switching monit...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 6.1.2
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-14 14:55 UTC by Alexander Sanderson
Modified: 2024-08-28 19:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: Plasma 6.2.0 with Qt 6.7.3
Sentry Crash Report:


Attachments
A demonstration of the bug (1.39 MB, video/webm)
2024-03-14 15:09 UTC, Alexander Sanderson
Details
Demonstration on Neon / Plasma 6.1.1 (122.62 KB, image/png)
2024-07-01 18:20 UTC, ivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sanderson 2024-03-14 14:55:59 UTC
SUMMARY

STEPS TO REPRODUCE
1. Switch monitors (e.g. plug in laptop to an external monitor and leave only the external monitor enabled, in my setup)
2. Open any app
3. Right click on the panel

OBSERVED RESULT
The panel's context menu opens in a window in the middle of the screen

EXPECTED RESULT
The panel's context menu opens like any other context menu would, at the position where you right clicked the panel

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20240311
(available in About System)
KDE Plasma Version: 6.0.1 
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
150% Fractional scaling is enabled on both screens
Comment 1 Alexander Sanderson 2024-03-14 15:09:51 UTC
Created attachment 167171 [details]
A demonstration of the bug
Comment 2 ivan 2024-03-15 11:45:03 UTC
On Wayland the same thing happens when waking from sleep and/or locking and unlocking the session. Every right click on desktop or on panels when the focus is on another application will result in the contextual menu to appear in the middle of the screen. If the desktop or panel is focused via left click first, then the menu will appear correctly under the mouse, but the situation doesn't heal if the focus is given back to an application. A plasmashell restart fixes it.
Comment 3 Quinten Kock 2024-03-16 03:07:34 UTC
I'm currently experiencing a similar issue, although it could also be related to switching monitors as well. However, my panel is fine. But my desktop is not!

When the desktop itself is focused and I right-click on it, everything is fine. But when a window is focused, right-clicking the desktop causes the menu to appear.

After restarting the shell, it was indeed fixed. Switching back and forth again causes it to reappear.
Comment 4 ivan 2024-07-01 18:20:20 UTC
Unfortunately the issue is still there on Neon running the latest 6.1.1. Single display connected via DP to an AMD Radeon 5700XT. When unlocking after a display sleep and/or display power off/on, the desktop context manu and the trash widget menu keep appearing in a floating window in the center of the screen (if the desktop or the trash are not focused). Can't find any weird logs anywhere either...
Comment 5 ivan 2024-07-01 18:20:50 UTC
Created attachment 171247 [details]
Demonstration on Neon / Plasma 6.1.1
Comment 6 ivan 2024-07-03 15:41:12 UTC
Updated to 6.1.2 and the trash widget contextual menu now appears in the right place even if it's not focused. Unfortunately the desktop one still appears in the center of the screen as a window.
Comment 7 ivan 2024-07-05 07:48:03 UTC
(In reply to ivan from comment #6)
> Updated to 6.1.2 and the trash widget contextual menu now appears in the
> right place even if it's not focused. Unfortunately the desktop one still
> appears in the center of the screen as a window.

Errata. Trash widget context menu still appears as a window in the middle of the screen :(
Comment 8 Nate Graham 2024-08-28 19:54:44 UTC
The originally reported issue here is now fixed in Plasma 6.2.0 and Qt 6.7.3.