viewSelector: Don't re-navigate into the active page

Starting keynav into the active page is handled from a key-press
handler on the stage, however we should not "start" keynav when
we are already navigating elsewhere - the latter can happen when
keynav fails (for instance because the focus is trapped inside an
open app folder or at the end of the dash), and the event bubbles
up to the stage. So make sure to only handle the event to actually
start keynav, to not interfere with the normal navigation handling.

Thanks to Carlos Soriano <carlos.soriano89@gmail.com> for the
debugging footwork.

https://bugzilla.gnome.org/show_bug.cgi?id=726760
This commit is contained in:
Florian Müllner 2014-05-23 17:14:20 +02:00
parent e747fcb16f
commit c228a9a89a

View File

@ -282,7 +282,7 @@ const ViewSelector = new Lang.Class({
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} else if (this._shouldTriggerSearch(symbol)) { } else if (this._shouldTriggerSearch(symbol)) {
this.startSearch(event); this.startSearch(event);
} else if (!this._searchActive) { } else if (!this._searchActive && !global.stage.key_focus) {
if (symbol == Clutter.Tab || symbol == Clutter.Down) { if (symbol == Clutter.Tab || symbol == Clutter.Down) {
this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
return true; return true;