GNOME Bugzilla – Bug 655069
altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab
Last modified: 2011-09-06 18:31:33 UTC
When we have more thumbnails than what fits on the primary display's width and press Alt+Shift+Above_Tab the thumbnails list doesn't scroll to the right. I've tried to fix it by calling actor.get_allocation_box() after creating the ThumbnailList object as is already done on the show() method (but at that point the ThumbnailList object isn't created yet). This works better in that we now do scroll but isn't enough since we don't really scroll all the way to the end. I've noticed that the allocation for the highlighted thumbnail is wrong[1] when this occurs but I haven't been able to actually fix that. I've run out of ideas so I'm filling this anyway in the hope that someone who knows clutter better than I do can spot the problem easily. [1] allocation.x2 is shorter than it should. Checked with this log: diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 59c6dd8..cd0a05e 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -666,6 +666,7 @@ SwitcherList.prototype = { let padding = this.actor.get_theme_node().get_horizontal_padding(); let parentPadding = this.actor.get_parent().get_theme_node().get_horizontal_padding(); let x = this._items[this._highlighted].allocation.x2 - monitor.width + padding + parentPadding; + log(this._items[this._highlighted].allocation.x2); Tweener.addTween(this._list, { anchor_x: x, time: POPUP_SCROLL_TIME, transition: 'easeOutQuad',
Created attachment 192399 [details] [review] altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab Force an allocation at thumbnails creation so we can figure out whether we need to scroll when selecting.
Comment on attachment 192399 [details] [review] altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab right, this is the same fix as bug 647807, just on the thumbnail list instead of the app list
Created attachment 193736 [details] [review] altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab Force an allocation at thumbnails creation so we can figure out whether we need to scroll when selecting. We also need to show() the whole AltTabPopup before calling _select() so that, when computing the scrolling offset, the widgets already have their styles loaded. Otherwise we will miss the switcher list item container's spacing. -- I didn't want to push this before figuring out the whole problem which I now did. Please re-review, thanks.
Review of attachment 193736 [details] [review]: Makes sense.
Attachment 193736 [details] pushed as 28bb0c1 - altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab