Bug 403809 - Only start PassiveNotification countdown timer when window has focus
Summary: Only start PassiveNotification countdown timer when window has focus
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-31 17:50 UTC by Nate Graham
Modified: 2019-02-11 16:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.56


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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