From 34aa46a844568432bf49163af3c0821a86e2e30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 5 Nov 2010 18:48:04 +0100 Subject: [PATCH] app-menu: Fix quit menu item As popup menus now take focus for keyboard navigation, no application is focused when activating the menu. Use the target application instead, which keeps track of the application currently associated with the menu. https://bugzilla.gnome.org/show_bug.cgi?id=634103 --- js/ui/panel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index eb1e4a378..286699516 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -408,9 +408,9 @@ AppMenuButton.prototype = { }, _onQuit: function() { - if (this._focusedApp == null) + if (this._targetApp == null) return; - this._focusedApp.request_quit(); + this._targetApp.request_quit(); }, _onAppStateChanged: function(tracker, app) {