GNOME Bugzilla – Bug 636650
AppSwitcher: Delay activating appIcons when the thumbnail list is open
Last modified: 2011-01-24 18:33:40 UTC
Quote from IRC: ---- <mccann> this worst alt tab bug is the behavior of the mouse crossing when the window box is up .. <mccann> drago01: you aim for the window box and hit an app icon and you get mad ----
Created attachment 175957 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open When aiming for the thumbnails with the mouse one might cross an icon by accident which causes the thumbnail list to be closed, which is frustrating. Fix this by delaying the icon activation when the thumbnail list is open.
*** Bug 613050 has been marked as a duplicate of this bug. ***
Comment on attachment 175957 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open >+ // We override SwitcherList's addItem to be able to use a custom enter-event handler that seems unnecessarily messy... there ought to be a simpler way >+ if (this._thumbnailsFocused) { >+ this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT, >+ Lang.bind(this, function () { >+ this._itemEntered(n); >+ })); >+ } It looks like this will get triggered after the timeout regardless of whether or not the pointer is still in the icon? > highlight : function(n, justOutline) { >+ // Sync the thumbnail focus state >+ this._thumbnailsFocused = justOutline; >+ it's actually "n != 1 && justOutline && this.icons[n].cachedWindows.length > 1". You should sync the _thumbnailFocused setting with the code that shows/hides the arrow.
(In reply to comment #3) > (From update of attachment 175957 [details] [review]) > >+ // We override SwitcherList's addItem to be able to use a custom enter-event handler > > that seems unnecessarily messy... there ought to be a simpler way Suggestions? I might be missing something obvious but everything else which I can think of is even worse ... > >+ if (this._thumbnailsFocused) { > >+ this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT, > >+ Lang.bind(this, function () { > >+ this._itemEntered(n); > >+ })); > >+ } > > It looks like this will get triggered after the timeout regardless of whether > or not the pointer is still in the icon? Indeed ... > > highlight : function(n, justOutline) { > >+ // Sync the thumbnail focus state > >+ this._thumbnailsFocused = justOutline; > >+ > > it's actually "n != 1 && justOutline && this.icons[n].cachedWindows.length > > 1". You should sync the _thumbnailFocused setting with the code that > shows/hides the arrow. OK
Created attachment 177658 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open When aiming for the thumbnails with the mouse one might cross an icon by accident which causes the thumbnail list to be closed, which is frustrating. Fix this by delaying the icon activation when the thumbnail list is open.
Comment on attachment 177658 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open >+ this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT, >+ Lang.bind(this, function () { second line is indented too far >+ } >+ else >+ this._itemEntered(index); "}" and "else" should be on the same line (and some people would say to use {}s on the else body too, since you have them on the if body, though I don't care). >+ if (this.icons[index].icon == pickedActor) >+ this._itemEntered(index); That will only trigger if the pointer is over the icon itself, but the original enter-event covered a larger actor (including the icon's label and various padding and spacing as well). I think you want "if (this._items[index].contains(pickedActor))" >+ // Sync the thumbnail focus state >+ this._thumbnailsFocused = n != -1 && justOutline && this.icons[n].cachedWindows.length >= 1; No, what I meant before was that there's no reason to try to recompute this state from scratch a second time, because (a) it's complicated, and (b) it corresponds exactly to whether or not we're displaying a down-arrow. So add "this._thumbnailsFocused = false;" after "this._arrows[this._curApp].hide();" and "this._thumbnailsFocused = true" after "this._arrows[this._curApp].show();".
Created attachment 177676 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open When aiming for the thumbnails with the mouse one might cross an icon by accident which causes the thumbnail list to be closed, which is frustrating. Fix this by delaying the icon activation when the thumbnail list is open.
Created attachment 177680 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open When aiming for the thumbnails with the mouse one might cross an icon by accident which causes the thumbnail list to be closed, which is frustrating. Fix this by delaying the icon activation when the thumbnail list is open. --- *) Fix _thumbnailsFocused bug
Created attachment 177687 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open When aiming for the thumbnails with the mouse one might cross an icon by accident which causes the thumbnail list to be closed, which is frustrating. Fix this by delaying the icon activation when the thumbnail list is open. ---- The last version didn't actually work either, so fix it again.
Created attachment 177692 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open When aiming for the thumbnails with the mouse one might cross an icon by accident which causes the thumbnail list to be closed, which is frustrating. Fix this by delaying the icon activation when the thumbnail list is open. ---- *) Changed thumbnail state tracking as discussed on IRC
Comment on attachment 177692 [details] [review] AppSwitcher: Delay activating appIcons when the thumbnail list is open sorry, forgot about this one. looks good
Attachment 177692 [details] pushed as 75d1230 - AppSwitcher: Delay activating appIcons when the thumbnail list is open