Bug 399257 - notifications are misplaced with an external monitor
Summary: notifications are misplaced with an external monitor
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-30 20:42 UTC by grouchomarx.fr
Modified: 2019-05-24 12:48 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
notification centered on screen on neon dev unstable (203.20 KB, image/jpeg)
2019-05-22 11:20 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description grouchomarx.fr 2018-09-30 20:42:30 UTC
When I switch between my laptop (1280x800) and an external monitor with a different resolution (1920x1080), the notifications are misplaced.

STEPS TO REPRODUCE
1. Plug in an external monitor with a higher resolution
2. Switch to this monitor (laptop's screen off)
3. Show a notification at the bottom right corner (for example with notify-send)

OBSERVED RESULT
The notification is misplaced, and its coordinates seem to be calculated from the laptop's screen resolution.

EXPECTED RESULT
The notification should be at the expected position.

SOFTWARE VERSIONS
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
- I am not sure if it is the same issue as Bug 361623 : the notification is not placed randomly or in the middle of the screen, it is displayed as if it was limited to the previous screen resolution.

- It also happens the other way around (unplugging the external screen). In that case, the notifications don't show at all.

- The panel and the volume OSD are at the correct positions.
Comment 1 Nick Cross 2019-03-20 12:06:55 UTC
I was seeing this on Fedora 29 ( Plasma 5.14.5 ) and checking Displays I noticed I had no primary monitor configured (panel was on laptop). Selecting a primary output seemed to resolve the position for me.
Comment 2 Patrick Silva 2019-05-22 11:20:58 UTC
Created attachment 120247 [details]
notification centered on screen on neon dev unstable

As we can see in the attached screenshot, the new notificatins system has the same bug on neon dev unstable.
Comment 3 Kai Uwe Broulik 2019-05-24 12:48:14 UTC
Git commit f76c949dc9623974eb55759776795dfab2e741e7 by Kai Uwe Broulik.
Committed on 24/05/2019 at 12:45.
Pushed by broulik into branch 'Plasma/5.16'.

[Notifications] Avoid stale screenRect

AppletInterface does not emit change signals for screen properties, only ContainmentInterface does it.
Since a fix will only be in a future Frameworks version 5.16 won't depend on, mitigate the effect by not caching the property.
The property was only a lazy Connections replacement anyway.
Also, compress screen change updates to avoid flickery animation of the popup as you resize the panel.
Related: bug 407504

Differential Revision: https://phabricator.kde.org/D21365

M  +22   -9    applets/notifications/package/contents/ui/global/Globals.qml

https://commits.kde.org/plasma-workspace/f76c949dc9623974eb55759776795dfab2e741e7