[gnome-shell] PopupMenuManager: don't throw exceptions if don't have focus
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] PopupMenuManager: don't throw exceptions if don't have focus
- Date: Wed, 2 Mar 2011 15:31:03 +0000 (UTC)
commit b9cb37da5eacd7fed76261a9295c189aba6e0ab9
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Feb 22 20:56:23 2011 +0100
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
js/ui/popupMenu.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 0a26ba7..9919922 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]