Bug 433709 - [wayland] Drop-down menus in Kate and Kwrite appear in the wrong place on Wayland Multi-Monitor and Multi-DPI
Summary: [wayland] Drop-down menus in Kate and Kwrite appear in the wrong place on Way...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.25.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-27 16:32 UTC by 322997am
Modified: 2022-12-03 06:10 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Photo of the effect, private information blurred (1.10 MB, image/png)
2021-02-27 16:32 UTC, 322997am
Details
Same effect as observed on a different display (1.15 MB, image/png)
2021-02-27 16:33 UTC, 322997am
Details
Issue clearly visible on a standard KDE application, Kate. (105.13 KB, image/png)
2022-06-25 12:19 UTC, Ilgaz Öcal
Details
badly position context menu with dolphin (187.62 KB, video/x-matroska)
2022-10-11 11:26 UTC, Apurv
Details
badly position context menu with dolphin (152.77 KB, video/mp4)
2022-10-11 11:28 UTC, Apurv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 322997am 2021-02-27 16:32:24 UTC
Created attachment 136229 [details]
Photo of the effect, private information blurred

SUMMARY
When using Kate/Kwrite on Wayland with two displays, the context menu for dropdowns appears in the wrong place

STEPS TO REPRODUCE
1. Open Kate/Kwrite on a multi-display wayland configuration
2. Open a dropdown menu
3. 

OBSERVED RESULT
The menu appears in a random part of the window

EXPECTED RESULT
The menu appears where it should

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.1
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 322997am 2021-02-27 16:33:15 UTC
Created attachment 136230 [details]
Same effect as observed on a different display
Comment 2 Christoph Cullmann 2021-03-07 11:41:48 UTC
I would tend to say this is an issue in the wayland compositor, we don't place this menus explicitly.
Comment 3 Landgraf132 2021-04-12 08:01:24 UTC
I confirm, I have the same problem.
Screenshot:  https://i.imgur.com/YBF6xVU.png
First display connected via hdmi, second via DP
Comment 4 David Edmundson 2021-04-12 09:59:23 UTC
See QTBUG-85297
Comment 5 Landgraf132 2021-06-09 10:00:09 UTC
KDE Neon: Plasma 5.22.0 
Qt:5.15.3
still reproduced
Comment 6 conihorse 2021-12-26 15:44:00 UTC
Still happening on :
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Comment 7 Ilgaz Öcal 2022-06-25 12:16:12 UTC
This exact issue happens on openSUSE. Strangely enough, only Qt applications are affected. GTK applications such as GIMP show menus in the right place.

Operating System: openSUSE Tumbleweed 20220624
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.2
Kernel Version: 5.18.4-1-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500
Manufacturer: Hewlett-Packard
Product Name: HP Pavilion 13 x360 PC
System Version: 0977120000405F00000410180
Comment 8 Ilgaz Öcal 2022-06-25 12:19:03 UTC
Created attachment 150141 [details]
Issue clearly visible on a standard KDE application, Kate.

This is happening on all qt-based applications when Wayland is enabled and the application is on secondary (but selected as main) display. On the system's main display (e.g. laptop screen instead of HDMI-connected monitor) the issue is there but different, it shows menus very below the pointer.
Comment 9 Apurv 2022-10-11 11:26:28 UTC
Created attachment 152699 [details]
badly position context menu with dolphin

facing the same issue
Comment 10 Apurv 2022-10-11 11:28:08 UTC
Created attachment 152700 [details]
badly position context menu with dolphin
Comment 11 Ilgaz Öcal 2022-12-03 05:30:27 UTC
The issue is resolved upstream however it is fixed in qt 6.4.0 RC1, 6.5.0 Beta1 which aren't yet relevant to KDE or other current qt5 applications. The only choice left to the user is disabling wayland.
Comment 12 Ilgaz Öcal 2022-12-03 06:10:29 UTC
There is a workaround on Reddit saying
"As a temporary fix, I found that if I align both monitors to the top, then menus are shown in the correct position. My laptop monitor is 1366x768, and the second monitor is 1920x1080, placed to the right of the laptop."
https://www.reddit.com/r/kde/comments/s1fqjj/comment/hu1ecdn/?utm_source=share&utm_medium=web2x&context=3
which fixed the issue here.