[notifications] Refactor the screen handling code

Review Request #126408 - Created Dec. 17, 2015 and submitted

Information
Martin Klapetek
plasma-workspace
126658
Reviewers
plasma
If anybody with multi-screen setup could test this,
that'd be much appreciated.

---

After the 5.5.0/.1 there were quite a few reports about
notifications having all sorts of wrong positions and
appearing on the wrong screens and combination of these.

So I started looking into the code, added a thing here,
removed a thing there and after a while it turned into
a small refactor of the screen and position handling
code.

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)

I've been testing all sorts of im/possible combinations
of multi-screen setups, panel movements on screen, between
screens, screen movements etc. Worked as expected in all
situations.

Einar77 also confirms things are working correctly after
a quick test.

Martin Flöser
Martin Klapetek
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 0c6b354b7e22297544f1d37608d6fdcd777c4d52 by Martin Klapetek to branch Plasma/5.5.
Loading...