Bug 454779

Summary: QMenus mispositioned using Wayland QPA with multiple monitors when top edges of monitors are not aligned
Product: [Plasma] kwin Reporter: Be <be.0>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: chniucg, kde, nicolas.fella, postix
Priority: NOR    
Version First Reported In: 5.24.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of mispositioned menu

Description Be 2022-06-02 23:13:21 UTC
Created attachment 149423 [details]
screenshot of mispositioned menu

STEPS TO REPRODUCE
1. Connect external monitor
2. Start Plasma Wayland session
3. Open Display Configuration in System Settings
4. Drag representations of monitors such that their top edges are not aligned, click Apply
5. Open QWidgets application, for example Kate, and open a menu

OBSERVED RESULT
Menu is shown in an incorrect position, for example to the right side of the window

EXPECTED RESULT
Menu is shown at the clicked location

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Fedora 36

ADDITIONAL INFORMATION
Workarounds:
1. Start Qt application with `-platform xcb` to run with XWayland (not great due to blurry high DPI scaling)
2. Align tops of monitors in Display Configuration

I cannot reproduce this with GNOME Wayland, so it seems to be an issue in the interaction between KWin and Qt's Wayland QPA.
Comment 1 Be 2022-06-02 23:14:56 UTC
Monitor scale factor does not affect this. The crucial aspect is whether the top edges of the monitors are aligned in Display Configuration.
Comment 2 David Edmundson 2022-06-03 07:09:59 UTC
Rather the crucial aspect is if there's a screen at the logical point of 0,0.

there's a qt bug upstream
Comment 3 Nicolas Fella 2022-06-03 11:03:05 UTC
> there's a qt bug upstream

Can you link that here?
Comment 4 Be 2022-06-11 14:53:54 UTC
Ping David, could you link to that upstream Qt bug?
Comment 5 postix 2023-04-07 19:03:44 UTC
*** Bug 455609 has been marked as a duplicate of this bug. ***
Comment 6 postix 2023-04-07 19:04:08 UTC
(In reply to Be from comment #4)
> Ping David, could you link to that upstream Qt bug?

(In reply to Nicolas Fella from comment #3)
> > there's a qt bug upstream
> 
> Can you link that here?

I assume it's this one: https://bugreports.qt.io/browse/QTBUG-85297 ?