Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/lib/notificationsapplet.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 43 | { | |||
---|---|---|---|---|---|
44 | m_popupPosition = (NotificationsHelper::PositionOnScreen)configScreenPosition(); | 44 | m_popupPosition = (NotificationsHelper::PositionOnScreen)configScreenPosition(); | ||
45 | 45 | | |||
46 | connect(this, &Plasma::Applet::locationChanged, | 46 | connect(this, &Plasma::Applet::locationChanged, | ||
47 | this, &NotificationsApplet::onAppletLocationChanged); | 47 | this, &NotificationsApplet::onAppletLocationChanged); | ||
48 | 48 | | |||
49 | connect(containment(), &Plasma::Containment::screenChanged, | 49 | connect(containment(), &Plasma::Containment::screenChanged, | ||
50 | this, &NotificationsApplet::onScreenChanges); | 50 | this, &NotificationsApplet::onScreenChanges); | ||
51 | 51 | | |||
52 | // This is to handle when eg. panel gets moved on screen | 52 | Q_ASSERT(containment()); | ||
53 | // to a different screen edge | 53 | Q_ASSERT(containment()->corona()); | ||
54 | connect(KWindowSystem::self(), &KWindowSystem::workAreaChanged, | 54 | connect(containment()->corona(), &Plasma::Corona::availableScreenRectChanged, this, &NotificationsApplet::onScreenChanges); | ||
55 | this, &NotificationsApplet::onScreenChanges); | | |||
56 | 55 | | |||
57 | Plasma::Applet::init(); | 56 | Plasma::Applet::init(); | ||
58 | 57 | | |||
59 | onScreenChanges(); | 58 | onScreenChanges(); | ||
60 | onAppletLocationChanged(); | 59 | onAppletLocationChanged(); | ||
61 | } | 60 | } | ||
62 | 61 | | |||
63 | void NotificationsApplet::onScreenChanges() | 62 | void NotificationsApplet::onScreenChanges() | ||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |