Bug 370198 - [multiscreen] context menus are not correctly positioned
Summary: [multiscreen] context menus are not correctly positioned
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.20.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords: multiscreen
: 437648 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-06 13:15 UTC by Bhushan Shah
Modified: 2021-11-03 15:41 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
mgraesslin: Wayland+


Attachments
Context Menu wrong (403.89 KB, image/png)
2021-01-28 09:09 UTC, jayki
Details
Wayland Debug Log of starting Konsole (7.94 KB, text/plain)
2021-01-28 09:23 UTC, jayki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bhushan Shah 2016-10-06 13:15:23 UTC
I've two monitor setup which are positioned as below

____________________________________________________
|                ||                .               |
|                ||                .               |
|                ||       A        .               |
|                ||                .               |
|                ||                .      C        |
|________________||.................               |
                  |                .               |
                  |       B        .               |
                  |________________________________|

Now for explanation lets divide the screen 2 in 3 parts.

Where Area A is similarly sized as Screen 1 (smaller screen.)

Now if I do right click in Area B, its contextmenu appears displaced on area C.
context menu in Area A and C are correctly positioned but not ones in area B.
Comment 1 Martin Flöser 2016-10-06 13:18:22 UTC
please check with WAYLAND_DEBUG=1 what's the transient offset position passed to the context menu.
Comment 2 Bhushan Shah 2016-10-06 13:30:25 UTC
For record,

[671827.448]  -> wl_shell_surface@71.set_popup(wl_seat@7, 26381, wl_surface@47, 1366, 798, 0)
[672702.706]  -> wl_shell_surface@84.set_popup(wl_seat@7, 26383, wl_surface@47, 1366, 798, 0)

Popup is positioned at 1366x798 which is original height of click but offset by size of screen 0.
Comment 3 Martin Flöser 2016-10-06 13:33:24 UTC
Qt sends stupid coordinates. Not much we can do about it. We can try to ensure that popups are always positioned on top of the window at least
Comment 4 Nate Graham 2018-01-17 02:11:05 UTC
Same issue or root cause? https://bugs.kde.org/show_bug.cgi?id=387896

That one happens on a single-screen setup, though.
Comment 5 Martin Flöser 2018-01-17 16:05:25 UTC
(In reply to Nate Graham from comment #4)
> Same issue or root cause? https://bugs.kde.org/show_bug.cgi?id=387896
> 
> That one happens on a single-screen setup, though.

That's a different issue.
Comment 6 Aleix Pol 2018-01-31 00:23:29 UTC
See bug:
https://bugreports.qt.io/browse/QTBUG-53022
https://codereview.qt-project.org/#/c/157174/19

Doesn't seem to be moving much though.
Comment 7 Claudius Ellsel 2020-10-19 07:53:50 UTC
(In reply to Aleix Pol from comment #6)
> See bug:
> https://bugreports.qt.io/browse/QTBUG-53022
> https://codereview.qt-project.org/#/c/157174/19
> 
> Doesn't seem to be moving much though.

Seems to be closed for some time now.

Is this bug still happening?
Comment 8 jayki 2021-01-28 09:09:02 UTC
Created attachment 135258 [details]
Context Menu wrong
Comment 9 jayki 2021-01-28 09:23:29 UTC
Created attachment 135260 [details]
Wayland Debug Log of starting Konsole
Comment 10 jayki 2021-01-28 09:24:24 UTC
I have the same issue with Latest Plasma 50.20.90 -> See attachment.

I only have this with hidpi screen 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..

Log with 


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
Comment 11 Landgraf132 2021-10-14 14:18:58 UTC
Operating System: KDE Neon
KDE Plasma Version: 5.23.0

Still being reproduced.
However, now horizontal positioning works correctly, but not vertical positioning.
Comment 12 Vlad Zahorodnii 2021-10-14 15:48:31 UTC
It's a Qt bug that can't be worked around in kwin.
Comment 13 Nate Graham 2021-11-03 15:41:37 UTC
*** Bug 437648 has been marked as a duplicate of this bug. ***