Bug 454779 - QMenus mispositioned using Wayland QPA with multiple monitors when top edges of monitors are not aligned
Summary: QMenus mispositioned using Wayland QPA with multiple monitors when top edges ...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.24.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 455609 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-02 23:13 UTC by Be
Modified: 2023-04-07 19:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screenshot of mispositioned menu (313.89 KB, image/png)
2022-06-02 23:13 UTC, Be
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ?