After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690857 - ScreenShield: don't animate arrows if the user is idle
ScreenShield: don't animate arrows if the user is idle
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: lock-screen
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-29 14:34 UTC by Giovanni Campagna
Modified: 2013-03-17 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ScreenShield: don't animate arrows if the user is idle (3.76 KB, patch)
2012-12-29 14:34 UTC, Giovanni Campagna
needs-work Details | Review
ScreenShield: don't animate arrows if the user is idle (4.30 KB, patch)
2013-01-02 18:30 UTC, Giovanni Campagna
needs-work Details | Review
ScreenShield: don't animate arrows if the user is idle (4.18 KB, patch)
2013-03-16 22:50 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-12-29 14:34:05 UTC
If the user is idle, it is very likely the monitor is off too, so let's
save some power by avoiding animations noone is going to see.
Comment 1 Giovanni Campagna 2012-12-29 14:34:08 UTC
Created attachment 232369 [details] [review]
ScreenShield: don't animate arrows if the user is idle
Comment 2 drago01 2012-12-29 23:20:23 UTC
Review of attachment 232369 [details] [review]:

Makes sense.

::: js/ui/screenShield.js
@@ +819,3 @@
+        if (idleTime < ARROW_IDLE_TIME) {
+            if (!this._arrowAnimationId) {
+                this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows));

Why is this hardcoded ? (Same in the old code but while you are touching this code you might as well just fix it; maybe a separate patch).
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-12-30 00:12:38 UTC
Review of attachment 232369 [details] [review]:

I wrote the IdleMonitor API to be better than this.

::: js/ui/screenShield.js
@@ +824,3 @@
+
+            if (!this._arrowWatchId)
+                this._arrowWatchId = this.idleMonitor.add_watch(ARROW_IDLE_TIME,

If the user is idle, they'll always take the bottom path.

@@ +834,3 @@
+            if (!this._arrowBecameActiveId)
+                this._arrowBecameActiveId = this.idleMonitor.connect('became-active',
+                                                                    Lang.bind(this, this._checkArrowAnimation));

Likewise, if the user became active, we always know they're going to take the top path.
Comment 4 Giovanni Campagna 2013-01-02 18:30:30 UTC
Created attachment 232553 [details] [review]
ScreenShield: don't animate arrows if the user is idle

If the user is idle, it is very likely the monitor is off too, so let's
save some power by avoiding animations noone is going to see.
Comment 5 Giovanni Campagna 2013-03-16 22:43:07 UTC
Hard code freeze ping!
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-03-16 22:46:27 UTC
Review of attachment 232553 [details] [review]:

This needs an update for the new IdleMonitor API
Comment 7 Giovanni Campagna 2013-03-16 22:50:54 UTC
Created attachment 239042 [details] [review]
ScreenShield: don't animate arrows if the user is idle

If the user is idle, it is very likely the monitor is off too, so let's
save some power by avoiding animations noone is going to see.

Oh! I had it rebased/updated locally, but forgot to attach.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-03-17 17:36:46 UTC
Review of attachment 239042 [details] [review]:

OK.
Comment 9 Giovanni Campagna 2013-03-17 18:34:04 UTC
Attachment 239042 [details] pushed as a9815ae - ScreenShield: don't animate arrows if the user is idle