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 652346 - Alt-Tab menu should not appear when instantly releasing keys again
Alt-Tab menu should not appear when instantly releasing keys again
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: Dan Winship
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-11 10:19 UTC by Robin Stocker
Modified: 2011-08-03 15:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
altTab: don't show popup immediatly in case the user is fast enough (2.58 KB, patch)
2011-06-12 17:35 UTC, Rui Matos
reviewed Details | Review
altTab: try to avoid showing the switcher when "flipping" (1.85 KB, patch)
2011-07-05 21:26 UTC, Dan Winship
none Details | Review
altTab: do a step transition instead of fading in (3.07 KB, patch)
2011-07-20 19:10 UTC, Rui Matos
needs-work Details | Review
altTab: do a step transition instead of fading in (3.36 KB, patch)
2011-07-20 21:23 UTC, Rui Matos
committed Details | Review

Description Robin Stocker 2011-06-11 10:19:10 UTC
When one quickly switches to the last used application, the Alt-Tab menu appears even though the user doesn't need to look at it. This creates a visual disturbance which looks like flickering.

The proposed fix is to wait for a very short time before showing the menu (say 250 ms), and if the user has already released the keys in this time, don't even show the menu. IIRC, Mac OS X and Windows also behave like this and it makes a difference in the "feeling" the UI gives.

(Don't know if this belongs to mutter or gnome-shell.)
Comment 1 Rui Matos 2011-06-12 17:35:12 UTC
Created attachment 189770 [details] [review]
altTab: don't show popup immediatly in case the user is fast enough

We wait a short bit before doing the initial tween to fade in the popup so
that fast Alt+Tab users aren't disturbed by the popup flashing in front of
their work.
Comment 2 Dan Winship 2011-07-05 21:26:24 UTC
Created attachment 191364 [details] [review]
altTab: try to avoid showing the switcher when "flipping"

Use a longer fade-in time, but with an inout transition, so that the
dialog starts fading in very slowly and then picks up speed after
200ms or so. That way if the user releases Alt+Tab right away, they'll
never actually see the dialog.
Comment 3 Dan Winship 2011-07-05 21:27:05 UTC
Comment on attachment 189770 [details] [review]
altTab: don't show popup immediatly in case the user is fast enough

This looks like it should work... but I'm attaching a simpler alternative. Does the timing on that patch work for you?
Comment 4 Rui Matos 2011-07-05 22:45:13 UTC
Review of attachment 191364 [details] [review]:

Yes, this seems to work too and it's simpler and safer than mine. The timing is about right I'd say.
Comment 5 Robin Stocker 2011-07-06 08:46:54 UTC
Does the opacity stay at 0 long enough with this transition? A quick calculation shows that it's only for about 40 to 60 ms that it stays at 0.
Comment 6 Dan Winship 2011-07-06 13:00:26 UTC
The idea is that it's "close enough" to 0 for longer than that. See the graph at http://hosted.zeh.com.br/tweener/docs/en-us/misc/transitions.html. Plugging in the numbers, it doesn't reach 10% opacity until 154ms, and then it reaches 90% opacity at 247ms. So it's pretty close to "invisible for 150ms, then tween in over 100ms, then fully visible after that". (Note that the dialog is fully reactive even when it's at 0% opacity, so the fact that it's not really *fully* visible at 250ms doesn't matter.)
Comment 7 Dan Winship 2011-07-06 13:05:09 UTC
pushed... git bz flaked out somehow
Comment 8 Robin Stocker 2011-07-06 13:39:19 UTC
I looked at the graph and even looked up the formula and put in the numbers. My point is that "pretty close to invisible" can still be noticeable and distracting.

Oh well, I guess I'll have to wrestle with jhbuild again and try it out. In any case, thank you both.
Comment 9 Nguyen Thai Ngoc Duy 2011-07-12 11:31:28 UTC
But if users do want to see alt-tab bar to pick the next app, it feels slow. Perhaps speed it up again when users press tab the second time and the bar has not been shown yet?
Comment 10 Dan Winship 2011-07-18 19:02:16 UTC
agree that it feels slow now... but speeding up on second Tab press isn't the fix, because the user may want to see what the first Tab would go to.

OS X appears to not have a fade in; the dialog appears instantly at full opacity if you haven't released Alt after a certain interval. (It does fade *out*, just not *in*.) Maybe we should do it like that.
Comment 11 Rui Matos 2011-07-20 19:10:47 UTC
Created attachment 192330 [details] [review]
altTab: do a step transition instead of fading in

Commit 7596fdb46091c7b224dc3d1b64b95252cec1b468 makes the popup feel slow.
Instead of fading the popup in we wait a bit and show it instantly.

Based on attachment 189770 [details] [review].
Comment 12 Dan Winship 2011-07-20 19:31:44 UTC
Comment on attachment 192330 [details] [review]
altTab: do a step transition instead of fading in

This feels good to me; long enough to not pop up when I release Alt quickly, but short enough that it doesn't feel delayed when I keep Alt down.

Can the people who have commented previously try this out and see if it works for them?

>+        this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT,
>+                                                           Lang.bind(this, function () {
>+                                                               this.actor.opacity = 255;

It seems weird to immediately show it with opacity 0, then later on change the opacity to 255. We should just not show() it until the timeout.
Comment 13 Rui Matos 2011-07-20 21:23:32 UTC
Created attachment 192340 [details] [review]
altTab: do a step transition instead of fading in

Commit 7596fdb46091c7b224dc3d1b64b95252cec1b468 makes the popup feel slow.
Instead of fading the popup in we wait a bit and show it instantly.

--

show() the actor only after the timeout.
Comment 14 Dan Winship 2011-08-03 15:01:03 UTC
Comment on attachment 192340 [details] [review]
altTab: do a step transition instead of fading in

>-        if (this.actor.visible) {
>+        if (this.actor.visible && this._initialDelayTimeoutId == 0) {

you don't need this change any more; the timeoutid should always be 0 if the actor is visible.

good to commit with that fix
Comment 15 Rui Matos 2011-08-03 15:26:27 UTC
Attachment 192340 [details] pushed as 10a0f2b - altTab: do a step transition instead of
fading in

Committed without that hunk. Thanks Dan.