[Notifications] Don't allow popup to obscure things in corners

Authored by ngraham on Aug 19 2019, 3:25 AM.


[Notifications] Don't allow popup to obscure things in corners

One thing that has been bugging me a bit with notifications is how close the pop-up is
to the screen corners/edges. It's so close that it obscures various things that live very
close to screen edges, such as windows' titlebars and the text input field in chat apps.
The latter case is really annoying in particular because if you have multiple chat apps
running, notifications from the app that's in the background will obscure what you're
typing in the text input field of the foreground chat app.

This patch fixes these types of issues by doing the following:

  • Adjusting the popup positioning algorithm make popups that are in a corner equidistant from both adjacent screen edges, rather than only one
  • Doubling the defualt distance from the nearest corner/edge

The combination of these changes allows pop-ups to no longer obscure window titlebars
and chat windows' input fields.

BUG: 401500
FIXED-IN: 5.16.5

Test Plan:
Top corner popup position no longer obscures window titlebar text and buttons:

Bottom corner popup position no longer obscures chat app's text input field:

Reviewers: broulik, Plasma, VDG

Reviewed By: broulik, Plasma

Subscribers: cblack, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D23253


ngrahamAug 29 2019, 3:38 PM
Differential Revision
D23253: [Notifications] Don't allow popup to obscure things in corners
R120:83d176ec3cd2: imake ssure to restack items with same parent