userMenu: Close menu immediately when activating Lock

When locking the screen, the user menu is moved to the opposite
side. Unless we close the menu immediately without animation, the
menu will jump to the other side and fade out while the screen
shield slides down.

https://bugzilla.gnome.org/show_bug.cgi?id=684343
This commit is contained in:
Florian Müllner 2012-09-19 05:02:15 +02:00
parent 10884ef7f5
commit 1f30670c1d

View File

@ -12,6 +12,7 @@ const Tp = imports.gi.TelepathyGLib;
const UPowerGlib = imports.gi.UPowerGlib;
const Atk = imports.gi.Atk;
const BoxPointer = imports.ui.boxpointer;
const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
@ -813,6 +814,7 @@ const UserMenuButton = new Lang.Class({
},
_onLockScreenActivate: function() {
this.menu.close(BoxPointer.PopupAnimation.NONE);
Main.overview.hide();
Main.screenShield.lock(true);
},