Bug 480588

Summary: OSDs on Wayland appear in the wrong place with multi-monitor setup
Product: [Plasma] plasmashell Reporter: Metz <metzelketzer>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: isma.af, kde, me, nate, nowrep, sitter
Priority: NOR Keywords: qt6
Version First Reported In: 5.93.0   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Metz 2024-01-31 09:47:33 UTC
SUMMARY

On a setup with 3 monitors, using the scrollwheel to change the volume, the corresponding OSD shows up on the top middle of the right monitor. This happens regardless of on which monitor the panel with volume control is.

Disabling the right monitor, then shows the OSD in the top right corner of the middle monitor.  After reactivating the right monitor, the OSD stays on the middle. 

I noticed this problems a couple of days ago but then the OSD always showed up on the left corner of the left monitor. Since the QT 6.7 beta 2 release today it changed to right, so probably related?

EXPECTED RESULT
Volume OSD to show up on the monitor the volume was changed on and as far i remember in the middle of the screen not in a corner.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: EndeavourOS 6.6.14-1-lts | KDE Wayland
(available in About System)
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.14-1-lts
Comment 1 Harald Sitter 2024-01-31 12:55:57 UTC
osdService lives in plasmashell. Moving bug there.
Comment 2 Nate Graham 2024-01-31 21:31:30 UTC
Can basically reproduce. With my common enough 2-screen setup with the primary on the left and the secondary on the right, the OSD always appears in the top-left corner of the primary.
Comment 3 Metz 2024-01-31 22:02:12 UTC
Should have waited a couple of hours. Did not see that RC2 is due today.  Updated but problem still there, but now OSD is in the left top corner of the right monitor.
Comment 4 Bug Janitor Service 2024-02-04 04:36:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1048
Comment 5 Nate Graham 2024-02-08 16:06:50 UTC
Git commit ef6b06b871d0a8e9ac2648d60fab960bf011a9bd by Nate Graham, on behalf of Yifan Zhu.
Committed on 08/02/2024 at 16:04.
Pushed by ngraham into branch 'master'.

plasmaquick/dialog: Call repositionIfOffScreen after setup

Otherwise under wayland, the default placement by kwin will be ignored.

M  +5    -2    src/plasmaquick/dialog.cpp

https://invent.kde.org/plasma/libplasma/-/commit/ef6b06b871d0a8e9ac2648d60fab960bf011a9bd
Comment 6 Nate Graham 2024-02-08 16:10:30 UTC
Git commit 3a877da2314a097fb7341c4026d8d2edd8457da5 by Nate Graham, on behalf of Yifan Zhu.
Committed on 08/02/2024 at 16:07.
Pushed by ngraham into branch 'Plasma/6.0'.

plasmaquick/dialog: Call repositionIfOffScreen after setup

Otherwise under wayland, the default placement by kwin will be ignored.


(cherry picked from commit ef6b06b871d0a8e9ac2648d60fab960bf011a9bd)

M  +5    -2    src/plasmaquick/dialog.cpp

https://invent.kde.org/plasma/libplasma/-/commit/3a877da2314a097fb7341c4026d8d2edd8457da5