PopupMenuManager: don't throw exceptions if don't have focus
stage.key_focus can be null, but passing null to _activeMenuContains throws (from gjs marshalling). In that case, just assume it returned false. https://bugzilla.gnome.org/show_bug.cgi?id=642976
This commit is contained in:
parent
6207c68439
commit
b9cb37da5e
@ -1252,7 +1252,7 @@ PopupMenuManager.prototype = {
|
||||
menu.sourceActor.grab_key_focus();
|
||||
} else if (menu == this._activeMenu) {
|
||||
let focus = global.stage.key_focus;
|
||||
let fromActive = this._activeMenuContains(focus);
|
||||
let fromActive = focus && this._activeMenuContains(focus);
|
||||
|
||||
if (this.grabbed)
|
||||
this._ungrab();
|
||||
|
Loading…
Reference in New Issue
Block a user