modalDialog: grab focus immediately, not after fade-in

If the user types Alt+F2 and then immediately starts typing, some keys
can get lost. Fix that by grabbing focus sooner.

https://bugzilla.gnome.org/show_bug.cgi?id=644857
This commit is contained in:
Dan Winship
2011-03-15 16:05:40 -04:00
parent d0dd37fe94
commit bad8dbc2d2
2 changed files with 7 additions and 8 deletions

View File

@ -210,10 +210,7 @@ __proto__: ModalDialog.ModalDialog.prototype,
this._entryText = entry.clutter_text;
this.contentLayout.add(entry, { y_align: St.Align.START });
this.connect('opened',
Lang.bind(this, function() {
this._entryText.grab_key_focus();
}));
this.setInitialKeyFocus(this._entryText);
this._errorBox = new St.BoxLayout({ style_class: 'run-dialog-error-box' });