Bug 447330 - Context menus have wrong position (offset) on multi monitor setups with different resolutions
Summary: Context menus have wrong position (offset) on multi monitor setups with diffe...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.23.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-12-21 11:09 UTC by M. Schulte
Modified: 2022-11-20 21:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description M. Schulte 2021-12-21 11:09:29 UTC
SUMMARY
***
Not sure if this is actually kwin related. Context menus in some apps like Dolphin and Kate appear not under the cursor but shifted downwards.
See: https://i.imgur.com/L5n11Yr.png
This only happens in Wayland and when using a multi monitor setup with different resolutions where both displays are aligned at the bottom edge (See: https://i.imgur.com/mWspX4E.png). If I align them to share their upper edge (see: https://i.imgur.com/UPHvgYH.png) it works fine.
Offset menus will happen on both monitors and only when clicking in the upper half of each monitor.
***


STEPS TO REPRODUCE
1.  Have two displays configured with different sizes/resolutions.
2.  Align them so that they share the same bottom edge.
3.  Open Kate and right click somewhere in the window. Make sure you click somewhere in the upper half of the monitor.

OBSERVED RESULT
Context menu is vertically offset and appears lower than the cursor.

EXPECTED RESULT
Context menu should appear under the cursor.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 indecisiveautomator 2022-01-03 23:18:27 UTC
I'm experiencing similar problems with a multi monitor setup on Wayland, however my context menus are horizontally offset.

My monitors are aligned with three on the bottom and one in the top middle (https://i.postimg.cc/44pvqfMs/Screenshot-20220103-224638.png). If I move the top monitor to being on the far left side, the issue is resolved. If I move it to the middle, my context menus are displayed incorrectly.

For me, the context menus are aligned too far to the right (https://i.postimg.cc/QddpFpMd/Screenshot-20220103-224835.png), and happens regardless of what display I right click on and where I right click (I can't workaround by clicking in certain halves of the display like OP). This does not affect all applications, for instance Firefox and Chromium are fine. Applications such as Dolphin, Kate and even GTK apps like Lutris display their context menus incorrectly.

Hopefully this can be fixed in time for Plasma 5.24!
Comment 2 indecisiveautomator 2022-01-05 17:51:39 UTC
Still present in Plasma 5.23.5 :(
Comment 3 David Edmundson 2022-01-06 16:14:29 UTC
https://bugreports.qt.io/browse/QTBUG-85297
Comment 4 indecisiveautomator 2022-11-20 21:27:34 UTC
For me, this is fixed in Plasma 5.26.3, with KDE Frameworks 5.100.0 and Qt 5.15.7! This was not mentioned on this issue or the upstream Qt issue, so I wanted to make note of it here.