Bug 432244

Summary: Hidpi wayland context menus wrong position
Product: [Plasma] kwin Reporter: jayki <jayki>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: auxsvr, kde, kde, nate, postix
Priority: NOR    
Version First Reported In: 5.20.90   
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=433336
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Konsole Screenshot with wrong context menu
Wayland Debug Log of starting Konsole

Description jayki 2021-01-28 11:43:01 UTC
Created attachment 135262 [details]
Konsole Screenshot with wrong context menu

SUMMARY

Context Menus are completely wrong positioned. They always appear far right on the active screen and not where they should. (See Attachment from Konsole)

My Setup is 3 Screens:
2 1080p (left and right)
1 4k (middle)

I only have this when Hidpi screen is activated and only in Wayland. 
If i set all 3 screens to 1080p, everything is fine,
If i set middle screen to 4k, its wrong.
If i set middle screen to 4k and scale to 175% even more is wrong..
If i only active 4K screen and deactivate the others, everything is fine. With scaling and without.


STEPS TO REPRODUCE
1. Have multiple screens. One HIDPI like 4K. 
2. click context menu in any Application like Konsole -> Settings
3. 

OBSERVED RESULT
Context Menu appear far left on the active screen (on any monitor i use)


EXPECTED RESULT
Context Menu should appear right beyond the button.

Operating System: Arch Linux
KDE Plasma Version: 5.20.90
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.10-arch1-1
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: Radeon RX 580 Series


ADDITIONAL INFORMATION
See attachments. i did a log from konsole with wayland Debug.
Comment 1 jayki 2021-01-28 11:43:57 UTC
Created attachment 135263 [details]
Wayland Debug Log of starting Konsole
Comment 2 David Edmundson 2021-01-28 11:51:51 UTC
[1670146,506]  -> xdg_positioner@112.set_anchor_rect(1920, 30, 1, 1)

So this is telling kwin to reposition the context menu 1920 pixels right of the konsole window's top left position.

Which looks like what we're doing. 


Kwin seems correct. It means it's client-side.

I believe we have a known bug of Qt (wrongly) trying to keep the context menu on-screen which conflicts with how wayland needs to work.
Comment 3 STPR 2021-06-09 21:59:28 UTC
Coming from #433336, I see that the issue has been marked as resolved, but the problem still persists. Does this mean that there is nothing that can be done but wait for Qt to supply a fix?
Comment 4 Nate Graham 2021-06-09 22:36:44 UTC
Yeah. :/
Comment 5 STPR 2021-06-10 02:35:21 UTC
Thanks Nate, this is rather unfortunate as its effects on usability are rather ... substantial for people with similar setups. Looking at the Qt report, there doesn't seem to be much movement since last August, which doesn't particularly inspire confidence. Guess I'll have to put off Wayland for a few months (hopefully not too much longer though).