Bug 403809

Summary: Only start PassiveNotification countdown timer when window has focus
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Nate Graham <nate>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns
Priority: NOR    
Version: unspecified   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=403792
Latest Commit: Version Fixed In: 5.56

Description Nate Graham 2019-01-31 17:50:45 UTC
Right now PassiveNotifications get missed when the window doesn't have focus or is obscured, because the countdown timer starts immediately. It should only start when the window has focus.
Comment 1 Nate Graham 2019-02-11 16:25:46 UTC
Git commit 0ed491d9d19cc6df523a4ee63bed6cf74d25ec57 by Nate Graham.
Committed on 11/02/2019 at 16:07.
Pushed by ngraham into branch 'master'.

[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.
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

M  +9    -1    src/controls/templates/private/PassiveNotification.qml

https://commits.kde.org/kirigami/0ed491d9d19cc6df523a4ee63bed6cf74d25ec57
Comment 2 Nate Graham 2019-02-11 16:47:07 UTC
Git commit 0ed491d9d19cc6df523a4ee63bed6cf74d25ec57 by Nate Graham.
Committed on 11/02/2019 at 16:07.
Pushed by ngraham into branch 'master'.

[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.
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

M  +9    -1    src/controls/templates/private/PassiveNotification.qml

https://commits.kde.org/kirigami/0ed491d9d19cc6df523a4ee63bed6cf74d25ec57