[PassiveNotification] Don't start timer until window has focus

Authored by ngraham on Feb 6 2019, 9:09 PM.

Description

[PassiveNotification] Don't start timer until window has focus

Summary:
WIth this patch, the PassiveNotification's timer only starts when its parent window
has focus. This is important on the desktop where it's common to work with multiple
windows at a time, and otherwise these notifications are very easy to miss, especially
when their parent window is minimized or behind another window.

BUG: 403809
FIXED-IN: 5.56

Thanks to @broulik for the patch!

Test Plan:
Open Discover, navigate to Source page, try to remove a Flatpak repo, then cancel the
password prompt and immediately sewitch to another window before the notification fires.
It will sit there on the window as long as it's inactive, and only disappear a few
seconds after the window gets focus.

Reviewers: Kirigami, mart, broulik, apol

Reviewed By: Kirigami, mart

Subscribers: plasma-devel, broulik

Tags: Kirigami

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

Details