You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plasma-workspace/0003-notifications-Ensure-t...

48 lines
1.9 KiB

From b806d726ccfc2507bb7636029e60a9b02b6da3a3 Mon Sep 17 00:00:00 2001
From: Martin Klapetek <mklapetek@kde.org>
Date: Thu, 7 Jan 2016 13:32:25 -0500
Subject: [PATCH 3/6] [notifications] Ensure the applet gets correct screen
geometry when loaded
The bug happens because the binary part of the applet sends out the
available screen resolution _before_ the applet is fully loaded AND also
whenever the screen changes in any way. This works fine with the non-
auto hiding panel because once the panel gets loaded, it changes the
available screen area (cause the part where panel is is reserved and
windows cannot go there) and that change is told to the binary part of
the applet and that part tells the positioning part.
However with the auto-hiding panel the signal about the changed
available screen space never arrives because the panel does not take
that space when it loads. And so the applet was left with "available
screen space = 0x0" because the first signal is sent out before the
applet is fully loaded.
So the obvious fix is to simply ask for the available screen space
_after_ the applet has finished loading.
BUG: 357652
FIXED-IN: 5.5.4
---
applets/notifications/package/contents/ui/Notifications.qml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/applets/notifications/package/contents/ui/Notifications.qml b/applets/notifications/package/contents/ui/Notifications.qml
index a354abb..eab4bc1 100644
--- a/applets/notifications/package/contents/ui/Notifications.qml
+++ b/applets/notifications/package/contents/ui/Notifications.qml
@@ -189,6 +189,10 @@ Column {
NotificationsHelper {
id: notificationPositioner
popupLocation: plasmoid.nativeInterface.screenPosition
+
+ Component.onCompleted: {
+ notificationPositioner.setPlasmoidScreenGeometry(plasmoid.nativeInterface.availableScreenRect);
+ }
}
Repeater {
--
2.5.0