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 647807 - App Switcher scrolling is broken
App Switcher scrolling is broken
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-14 19:03 UTC by Dan Winship
Modified: 2011-04-26 19:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
altTab: disable scrolling (1.33 KB, patch)
2011-04-14 19:08 UTC, Dan Winship
rejected Details | Review
altTab: Fix the appSwitcher's allocation (1.38 KB, patch)
2011-04-17 18:18 UTC, drago01
committed Details | Review
altTab: fix Alt+Tab scrolling on initial display (1.37 KB, patch)
2011-04-18 13:55 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2011-04-14 19:03:07 UTC
1. Make this change to altTab.js:

    -const iconSizes = [96, 64, 48, 32, 22];
    +const iconSizes = [96];

2. Restart

3. Launch a bunch of apps

4. Alt+Tab

It is supposed to make the list start scrolling horizontally when there is not enough room, but instead it just starts squishing things together (while still showing the right arrow, as though scrolling were possible).

This is pretty difficult to expose since without the patch above, it will scale the icons down to 22x22 before resorting to scrolling, so you need a crazy number of apps to reach the limit...
Comment 1 Dan Winship 2011-04-14 19:08:02 UTC
Created attachment 185977 [details] [review]
altTab: disable scrolling

Alt+Tab scrolling is apparently completely broken. Since it may also
be the source of a crasher (RH #696522), just disable it for 3.0.x.
Comment 2 drago01 2011-04-17 17:44:07 UTC
Review of attachment 185977 [details] [review]:

No, this affects the thumbnails too where scrolling is way more common (i.e you do not need a crazy number of windows to hit that).

Will try to find out what is broken with the icons.
Comment 3 drago01 2011-04-17 18:16:46 UTC
(In reply to comment #0)
> 1. Make this change to altTab.js:
> 
>     -const iconSizes = [96, 64, 48, 32, 22];
>     +const iconSizes = [96];
> 
> 2. Restart
> 
> 3. Launch a bunch of apps
> 
> 4. Alt+Tab
> 
> It is supposed to make the list start scrolling horizontally when there is not
> enough room, but instead it just starts squishing things together (while still
> showing the right arrow, as though scrolling were possible).

The problem seems to be the check:

if (this.actor.allocation.x2 == primary.x + primary.width - parentRightPadding)

in _allocate which is never hit for the icons but is for the thumbnails, in the icon case just doing parentRightPadding * 2 seems to "fix" it so something must be wrong in the allocation of the appSwitcher box itself.

Looking at the code indicates that this is caused by a typo in AltTabPopup._allocate:

        childBox.x2 = Math.min(primary.x + primary.width - hPadding, childBox.x1 + childNaturalWidth);

should be:

        childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);

And this seems to indeed fix it.
Comment 4 drago01 2011-04-17 18:18:40 UTC
Created attachment 186155 [details] [review]
altTab: Fix the appSwitcher's allocation

A typo in AltTabPopup._allocate was causing the allocation to be wrong
which broke icon scrolling, so fix that.
Comment 5 Dan Winship 2011-04-18 13:55:25 UTC
Comment on attachment 186155 [details] [review]
altTab: Fix the appSwitcher's allocation

This is correct, although initial scrolling is still broken. (ie, start a bunch of apps, Ctrl+Shift+Tab; the last app will be selected, but it will be offscreen).

(The fact that that is broken leads me to believe that maybe this has nothing to do with the bugzilla.redhat.com bug mentioned earlier, but...)
Comment 6 Dan Winship 2011-04-18 13:55:49 UTC
Created attachment 186202 [details] [review]
altTab: fix Alt+Tab scrolling on initial display

The initial selection of the Alt+Tab dialog was happening before the
dialog was shown and allocated, and so the "do we need to scroll"
check used bogus coordinates. Fix by showing the dialog (and forcing
an allocation) first.

====

feel free to squash
Comment 7 drago01 2011-04-21 10:12:55 UTC
Review of attachment 186202 [details] [review]:

Looks good and seems to work (marking it commit after freeze to get it off the list).
Comment 8 drago01 2011-04-26 19:10:40 UTC
Attachment 186155 [details] pushed as d2a16bc - altTab: Fix the appSwitcher's allocation
Attachment 186202 [details] pushed as fe08edb - altTab: fix Alt+Tab scrolling on initial display