grabHelper: Restore the actually saved focus on ungrab

GrabHelper saves the actor that had key focus when taking over the grab
(if any). On ungrab, the key focus is either restored or moved to some
child of the saved actor. The latter is unexpected and causes some odd
behavior, so don't be fancy and only restore the actual focus.

https://bugzilla.gnome.org/show_bug.cgi?id=693570
This commit is contained in:
Florian Müllner 2013-02-09 23:05:43 +01:00
parent 6576d4852c
commit 60257f422a

View File

@ -311,7 +311,8 @@ const GrabHelper = new Lang.Class({
if (hadFocus) {
let poppedGrab = poppedGrabs[0];
_navigateActor(poppedGrab.savedFocus);
if (poppedGrab.savedFocus)
poppedGrab.savedFocus.grab_key_focus();
}
},