Bug 438508

Summary: wayland, iGPU multi-monitor: right click menu displaced to edge of monitor
Product: [Plasma] kwin Reporter: Nowa Ammerlaan <nowa>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: ekigwana, ericedlund2017, nate
Priority: NOR Keywords: wayland
Version: 5.22.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-85297
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screens shot
Screens shot
Screens shot
Screens shot
Screen shot
Screen shot
Screen shot
Screen shot

Description Nowa Ammerlaan 2021-06-12 14:35:57 UTC
SUMMARY

Right clicking in e.g. konsole makes the right click menu show up near the screen edge instead of at the cursor location. 
- This appears to occur for a lot of KDE applications, but not for GTK applications, some Qt applications appear unaffected as well (e.g. SciDaVis)
- Launching e.g. konsole with QT_QPA_PLATFORM=xcb fixes the issue.
- The right click menus of the desktop/plasmashell are not effected, nor the right click menu's of the window title bar. This only occurs when right clicking *inside* the application. (e.g. right click the konsole titlebar: normal, right click inside the konsole window: menu is all the way on the edge of the screen)
- It only occurs in wayland
- It only occurs on my PC which is using the iGPU multi-monitor feature (i.a.w. the output ports of the integrated Intel GPU are used as well as the output ports of the dedicated GPU). It does not occur on my laptop which has only the Intel GPU.


STEPS TO REPRODUCE
1. Start wayland session on a computer with iGPU multi monitor enabled
2. Start any KDE application (e.g. konsole, dolphin, kile, kate)
3. Right click anywhere inside the appliction

OBSERVED RESULT
The right click menu pops up on the right edge of the active monitor


EXPECTED RESULT
The right click menu pops up at the cursor position, as it does for all other applications.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.12.6
(available in About System)
KDE Plasma Version:  5.22.0
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Comment 1 Edward Kigwana 2021-11-12 15:27:05 UTC
Created attachment 143487 [details]
Screens shot
Comment 2 Edward Kigwana 2021-11-12 15:28:25 UTC
Created attachment 143489 [details]
Screens shot
Comment 3 Edward Kigwana 2021-11-12 15:28:43 UTC
Created attachment 143491 [details]
Screens shot
Comment 4 Edward Kigwana 2021-11-12 15:29:03 UTC
Created attachment 143492 [details]
Screens shot
Comment 5 Edward Kigwana 2021-11-12 15:29:30 UTC
Created attachment 143493 [details]
Screen shot
Comment 6 Edward Kigwana 2021-11-12 15:29:48 UTC
Created attachment 143494 [details]
Screen shot
Comment 7 Edward Kigwana 2021-11-12 15:30:14 UTC
Created attachment 143495 [details]
Screen shot
Comment 8 Edward Kigwana 2021-11-12 15:30:36 UTC
Created attachment 143496 [details]
Screen shot
Comment 9 Edward Kigwana 2021-11-12 15:31:57 UTC
iIn Wayland, it seems that the problem area is the menu placement logic in a multi-screen environment and the results make it unusable. I have captured several screen shots to illustrate the issue. Note that context menus are also affected. I first noticed the issue when using Kdevelop stretched across two screens with a split view. It appears that menu logic goes out of the way to ensure that a menu is not drawn across two screens but is too aggressive on when deciding to relocate a menu to screen on the right.
Comment 10 Edward Kigwana 2021-11-12 15:35:14 UTC
Forgot to mention that I am running git master as of 2021-11-03
Comment 11 Eric Edlund 2022-01-13 22:49:15 UTC
*** Bug 448406 has been marked as a duplicate of this bug. ***
Comment 12 Eric Edlund 2022-01-13 22:50:07 UTC
I also have this issue on wayland.
Comment 13 Vlad Zahorodnii 2022-01-19 19:06:36 UTC
It's a Qt bug.