js: Use global.focus_manager, rather than grabbing it ourselves

This commit is contained in:
Jasper St. Pierre
2012-08-15 12:22:01 -04:00
parent cb5095370e
commit 0711a70398
3 changed files with 6 additions and 11 deletions

View File

@ -182,8 +182,7 @@ const Button = new Lang.Class({
_onMenuKeyPress: function(actor, event) {
let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
let focusManager = St.FocusManager.get_for_stage(global.stage);
let group = focusManager.get_group(this.actor);
let group = global.focus_manager.get_group(this.actor);
if (group) {
let direction = (symbol == Clutter.KEY_Left) ? Gtk.DirectionType.LEFT : Gtk.DirectionType.RIGHT;
group.navigate_focus(this.actor, direction, false);