Bug 490919 - Having two different sizes monitors causes misplaced popups in some applications
Summary: Having two different sizes monitors causes misplaced popups in some applications
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-28 11:40 UTC by sajito+kde
Modified: 2024-08-02 07:28 UTC (History)
1 user (show)

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


Attachments
Steam notification not at the bottom of the screen. (1.96 MB, image/png)
2024-07-28 11:40 UTC, sajito+kde
Details
Android studio popup not opening at the top of the screen (121.05 KB, image/png)
2024-07-28 11:42 UTC, sajito+kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sajito+kde 2024-07-28 11:40:59 UTC
Created attachment 172064 [details]
Steam notification not at the bottom of the screen.

SUMMARY
I have two monitors, with different resolutions.
Left monitor with 1920x1080 and right monitor with 2560x1440. Both have the same scaling of 100%.
The monitors are not aligned on the top or bottom, more like vertically centered.
Both monitors have a panel on the top and the bottom.

With some applications (as far as I can tell mostly for xwayland applications), when they need to create popups and those popups should appear on the lower or upper edge of the screen, the popup instead appears where they would be positioned, if they would appear on the smaller screen.
This only happens on wayland.

It's a bit hard to explain, will attach screenshots.


STEPS TO REPRODUCE
1. Have two monitors with different resolutions and same scaling
2. Have the smaller screen on the left (?)
3. Use wayland
4. Place panel at the top and the bottom of the smaller monitor
4. Have some applications open popups, like Steam with it's notifications or IntelliJ with any popup.

OBSERVED RESULT
The popups are aligned with the constraints set by the smaller monitor instead of the constraints of it's own monitor.


EXPECTED RESULT
The popups should appear at the correct place.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: Garuda Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.1-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 31.2 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4080 SUPER/PCIe/SSE2

ADDITIONAL INFORMATION
This issue disappears when removing the panels from the smaller screen.
Comment 1 sajito+kde 2024-07-28 11:42:01 UTC
Created attachment 172065 [details]
Android studio popup not opening at the top of the screen
Comment 2 sajito+kde 2024-07-28 11:50:55 UTC
Also when one tries to slowly drag a window from the title bar on the bigger screen, passing where the panel from the smaller screen would be, one can observe it behaves like an invisible barrier, where some the window get's stuck until the mouse is moved enough to pass it.
Comment 3 Nate Graham 2024-07-30 19:30:25 UTC
I'm afraid those are both app bugs. They're trying to be smart about where they place things, and failing.
Comment 4 sajito+kde 2024-07-30 19:45:46 UTC
Got to ask, since this issue has been reported nearly a year ago to Jetbrains and they investigated it a bit.
https://youtrack.jetbrains.com/issue/JBR-6397/Contextual-menus-display-in-the-wrong-place-in-my-1440p-monitor#focus=Comments-27-8597808.0-0

Is the observed value returned by `xprop -root` for `_NET_WORKAREA(CARDINAL)` in the linked comment correct and expected?

Also is the "invisible barrier" thing not related to the issue observed with IntelliJ and Steam? Since the barrier is at the exact same place, where the wrong placed popups appear, I thought that's not an coincidence.
Comment 5 sajito+kde 2024-08-02 07:28:47 UTC
Another thing I want to add here. When xwayland is restarted during the running session, then the issue stops and all the popups are placed correctly, until I log out and log in again.