My previous attempt only fixed the case when notifications were directly in a panel.
Now it also no longer crashes when removing a panel that has a System Tray with the
notifications applet in it.
BUG: 378508
FIXED-IN: 5.8.8
Differential Revision: https://phabricator.kde.org/D6653
is still there and rightfully emits availableScreenRectChanged.
This will cause us to crash when we try to access the no-longer existing containment.
CCBUG: 378508
Differential Revision: https://phabricator.kde.org/D5321
Summary:
connect to Plasma::Corona::availableScreenRectChanged
instead of using kscreen, this way we should be more sure
that signal is emitted when it's safe to call
corona()->availableScreenRect() as the change of rect
may happen after a screen removal, so may mean
accessing a desktop view while being deleted
BUG:377298
Test Plan:
notifications still pop up in the proper place,
couldn't reproduce the crash neither before nor after tough
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4991
This patch does this:
* moves the screen handling code from the import into
the applet baseclass, which can access the containment
available screen rect and watch for screen changes
* fixes the applet config dialog's custom screen position
setting which has a bug of always being enabled
* consolidates duplicated code in the helper import
into functions
* ensures that popups have correct positions when on
screen that does not start with y=0 (and x=0 in some
cases too)
REVIEW: 126408
CCBUG: 353966
CCBUG: 356461
It can happen that the onAppletLocationChanged() slot gets called before
init(), making init() reset the calculated position from the slot.
CCBUG: 356461
The globalConfig() in ctor returns a non-(yet-)existing KConfigGroup
which makes it always return the default value. So the config access
must be delayed for init().
Custom notification position is now correctly remembered.
BUG: 356419
FIXED-IN: 5.5.1
The notifications popup positioning recently regressed
by some other changes (looks like Qt) and the popups
would fly across the screen.
The proper solution is using KWin effect but given how
close the release is, this needs to be dealt with in a
different way.
The main problem is calculating the initial popup size
because as long as the Dialog is invisible, it has an
incorrect geometry, so it needs to be positioned right
after it's being displayed. The Dialog however gets the
sizes even later, so the code now calls a slot from Dialog
that ensures the sizes are correct before the initial
placement on screen. It's not ideal but I'm out of ideas
otherwise. Plus it should be only temporary until the
KWin effect will replace it.
Besides that, it moves the custom position handling from the
QML into the C++ applet class, making it easier.
REVIEW: 126221
BUG: 355069
FIXED-IN: 5.5.0
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0