messageTray: Take modal grabs for the context menu and notification boxpointer

As the context menu and notification boxpointer can only appear if we already
take a modal grab, grabFocus will have problematic results if the focus does
somehow change.

https://bugzilla.gnome.org/show_bug.cgi?id=698483
This commit is contained in:
Jasper St. Pierre 2013-03-21 15:29:16 -04:00
parent c57c08b2c6
commit fdae613b14

View File

@ -1748,7 +1748,7 @@ const MessageTray = new Lang.Class({
let [x, y, mask] = global.get_pointer();
this._contextMenu.setPosition(Math.round(x), Math.round(y));
this._grabHelper.grab({ actor: this._contextMenu.actor,
grabFocus: true,
modal: true,
onUngrab: Lang.bind(this, function () {
this._contextMenu.close(BoxPointer.PopupAnimation.FULL);
})
@ -2661,7 +2661,7 @@ const MessageTray = new Lang.Class({
}
this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
grabFocus: true,
modal: true,
onUngrab: Lang.bind(this, this._onSummaryBoxPointerUngrabbed) });
this._summaryBoxPointer.actor.opacity = 0;