Bug 436016

Summary: [Wayland] Context Menu Position Wrong
Product: [Plasma] kwin Reporter: Nayr438 <chrisacady>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: 4wy78uwh, auxsvr, grzesiek11, hamilton.tim, indecisiveautomator, kfm-devel, kt47uo5uvzw, nate, plasma-bugs, postix, rozelak
Priority: NOR Keywords: wayland
Version: 5.21.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-85297
See Also: https://bugs.kde.org/show_bug.cgi?id=440364
Latest Commit: Version Fixed In:
Attachments: Shows Offset on right click
Showing context menu for Settings being offset
Shows Konsole Menu popping up below Window

Description Nayr438 2021-04-21 18:12:55 UTC
Created attachment 137768 [details]
Shows Offset on right click

SUMMARY
When You have a monitor that extends upwards past another monitor, the context menu seems to offset the y position resulting in it appearing lower on the screen.

STEPS TO REPRODUCE
1. Setup 2 monitors where 1 has a resolution that extends taller than the other.
2. Align Main monitor to bottom left where right monitor extends above.
3. Open dolphin and right click in the Window.

OBSERVED RESULT
Context menu towards bottom of screen

EXPECTED RESULT
Context Menu next to pointer

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.11.14-147-tkg-bmq
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT

ADDITIONAL INFORMATION
Only happens in a Wayland Session.

I normally have 3 monitors setup as followed
2560x1440 -> Left Bottom
1920x1080 -> Center Counterclockwise, bottom aligned with bottom of 1st
1920x1080 -> Right, top aligned with top of center
Comment 1 Nayr438 2021-04-21 18:20:28 UTC
Created attachment 137769 [details]
Showing context menu for Settings being offset
Comment 2 Nate Graham 2021-04-23 20:08:15 UTC
Does this happen only in Dolphin? Or in other apps too? Does it also happen when you right-click on the desktop, or on any Plasma applets in your panel?
Comment 3 Nayr438 2021-04-25 00:24:23 UTC
(In reply to Nate Graham from comment #2)
> Does this happen only in Dolphin? Or in other apps too? Does it also happen
> when you right-click on the desktop, or on any Plasma applets in your panel?

It seems to happen with all KDE Applications. Such as the Toolbar in konsole, where the menu pops up below the window.

I can't reproduce it with GTK Applications or other QT Applications such as qBittorent and VLC.

I can't reproduce it on the Desktop or Panel.
Comment 4 Nayr438 2021-04-25 00:25:00 UTC
Created attachment 137890 [details]
Shows Konsole Menu popping up below Window
Comment 5 Nayr438 2021-04-25 00:26:58 UTC
I should clarify, that the Menu in konsole is just offset and doesn't always popup below the Window.
Comment 6 Nayr438 2021-04-25 01:21:21 UTC
I Take that back. I can reproduce it under MultiMC 5 as well, which is a QT Application.
Comment 7 Nate Graham 2021-04-26 19:48:45 UTC
Hmm, thanks. Might be in KWin, might be in Qt itself. Moving to KWin for now.
Comment 8 Vlad Zahorodnii 2021-04-27 17:12:10 UTC
It's a Qt bug.
Comment 9 Nate Graham 2021-07-28 20:16:55 UTC
*** Bug 438924 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-10-21 14:15:39 UTC
*** Bug 444189 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2022-03-29 00:30:37 UTC
*** Bug 451167 has been marked as a duplicate of this bug. ***
Comment 12 indecisiveautomator 2022-11-20 21:36:08 UTC
For me, this bug is fixed in Plasma 5.26.3 with KDE Frameworks 5.100.0 and Qt 5.15.7. Context menus appear in the correct place.

This bug is listed as a Wayland Showstopper until Qt 6.4 (probably Plasma 6.X?) (https://community.kde.org/Plasma/Wayland_Showstoppers#Quality-of-life_issues_caused_by_non-KDE_software), but I believe it can be removed completely now.

See also: Bug 447330
Comment 13 Nayr438 2022-11-20 21:58:20 UTC
(In reply to indecisiveautomator from comment #12)
> For me, this bug is fixed in Plasma 5.26.3 with KDE Frameworks 5.100.0 and
> Qt 5.15.7. Context menus appear in the correct place.
> 
> This bug is listed as a Wayland Showstopper until Qt 6.4 (probably Plasma
> 6.X?)
> (https://community.kde.org/Plasma/Wayland_Showstoppers#Quality-of-
> life_issues_caused_by_non-KDE_software), but I believe it can be removed
> completely now.
> 
> See also: Bug 447330
Operating System: Arch Linux
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 5700 XT

I can still reproduce this issue, so I believe it should still be listed.
Comment 14 postix 2022-12-02 14:21:17 UTC
(In reply to indecisiveautomator from comment #12)
> For me, this bug is fixed in Plasma 5.26.3 with KDE Frameworks 5.100.0 and
> Qt 5.15.7. Context menus appear in the correct place.

Can also still reproduce it on
Operating System: openSUSE Tumbleweed 20221128
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 6.0.8-1-default (64-bit)
Graphics Platform: Wayland