GNOME Bugzilla – Bug 615099
closing windows makes the current app indicator blink
Last modified: 2011-03-08 22:57:56 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.
Created attachment 180622 [details] [review] panel: prevent blink of current app indicator If new current app is null, show animation of disappearing old.
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
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
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'
Created attachment 182848 [details] [review] panel: prevent blink of current app indicator > you need an extra boolean like 'this._targetIsCurrent' done
Review of attachment 182848 [details] [review]: Looks good