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 655069 - altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab
altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-21 18:17 UTC by Rui Matos
Modified: 2011-09-06 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab (1.01 KB, patch)
2011-07-21 18:21 UTC, Rui Matos
accepted-commit_now Details | Review
altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab (2.13 KB, patch)
2011-08-13 01:28 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2011-07-21 18:17:22 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',
Comment 1 Rui Matos 2011-07-21 18:21:29 UTC
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 2 Dan Winship 2011-07-22 13:20:43 UTC
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
Comment 3 Rui Matos 2011-08-13 01:28:33 UTC
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.
Comment 4 drago01 2011-09-06 18:10:55 UTC
Review of attachment 193736 [details] [review]:

Makes sense.
Comment 5 Rui Matos 2011-09-06 18:31:30 UTC
Attachment 193736 [details] pushed as 28bb0c1 - altTab: make thumbnails scroll to right if needed at first Alt+Shift+Above_Tab