GNOME Bugzilla – Bug 647807
App Switcher scrolling is broken
Last modified: 2011-04-26 19:10:47 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...
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.
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.
(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.
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 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...)
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
Review of attachment 186202 [details] [review]: Looks good and seems to work (marking it commit after freeze to get it off the list).
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