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 615099 - closing windows makes the current app indicator blink
closing windows makes the current app indicator blink
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: Owen Taylor
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-04-07 20:49 UTC by Dan Winship
Modified: 2011-03-08 22:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
panel: prevent blink of current app indicator (1.73 KB, patch)
2011-02-10 22:39 UTC, Maxim Ermilov
needs-work Details | Review
panel: prevent blink of current app indicator (3.90 KB, patch)
2011-02-24 02:12 UTC, Maxim Ermilov
needs-work Details | Review
panel: prevent blink of current app indicator (4.03 KB, patch)
2011-03-08 17:50 UTC, Maxim Ermilov
committed Details | Review

Description Dan Winship 2010-04-07 20:49:45 UTC
When you close a window, the current app indicator briefly blanks out before switching to its new value. This is particularly noticeable when the old and new values are the same. Eg, go to an app, open up a dialog box, and then close the dialog box. The current app indicator will disappear and then reappear, drawing your eye up to the panel.
Comment 1 Maxim Ermilov 2011-02-10 22:39:04 UTC
Created attachment 180622 [details] [review]
panel: prevent blink of current app indicator

If new current app is null, show animation of disappearing old.
Comment 2 Owen Taylor 2011-02-23 22:29:25 UTC
Review of attachment 180622 [details] [review]:

The approach of making the transition to and from the empty state a tween seems OK to me.

::: js/ui/panel.js
@@ +452,3 @@
         let targetApp = focusedApp != null ? focusedApp : lastStartedApp;
+
+        Tweener.removeTweens(this.actor);

We can't assume _sync won't be called multiple times, and we shouldn't keep on re-adding tweens and extending the tween time in that case. a_sync function is "something potentially changed", not 'something changed".

The logic you want here, is:

+ if (this._targetApp == null && targetApp != null) {
+    /* tween to visible */
+ } else if (this._targetApp != null && targetApp == null) {
+    /* tween to invisible */
+ }
 this._targetApp = targetApp;
  if (targetApp != null) {

@@ +457,3 @@
+            if (this.actor.opacity != 255)
+                Tweener.addTween(this.actor, { opacity: 255,
+                                               time: 0.2,

should be a constant
Comment 3 Maxim Ermilov 2011-02-24 02:12:34 UTC
Created attachment 181787 [details] [review]
panel: prevent blink of current app indicator

> We can't assume _sync won't be called multiple times, and we shouldn't keep on
> re-adding tweens and extending the tween time in that case.
fixed
> The logic you want here, is:
Since we need store last not null app and don't need to handle null state.
I think, better don't set null value for this._targetApp
Comment 4 Owen Taylor 2011-03-06 00:36:33 UTC
Review of attachment 181787 [details] [review]:

::: js/ui/panel.js
@@ +523,3 @@
+        if (targetApp == null) {
+            if (!this.actor.reactive)
+                return;

This approach seems like it behaves right, but it's really unclean to use this.actor.reactive as the model. For this approach, you need an extra boolean like 'this._targetIsCurrent'
Comment 5 Maxim Ermilov 2011-03-08 17:50:52 UTC
Created attachment 182848 [details] [review]
panel: prevent blink of current app indicator

> you need an extra boolean like 'this._targetIsCurrent'
done
Comment 6 Owen Taylor 2011-03-08 18:04:20 UTC
Review of attachment 182848 [details] [review]:

Looks good