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