From e9d2a429ebedc21efd360d00f3e59af2c17cf00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 14 Dec 2011 21:21:04 +0100 Subject: [PATCH] message-tray: Allow to switch between left/right click directly Currently it is not possible to trigger the context menu while the summary notification is opened (and vice versa). To actually trigger the desired item, the user has to click again, which is annoying without a good justification, so allow switching directly between left/right click items. https://bugzilla.gnome.org/show_bug.cgi?id=666197 --- js/ui/messageTray.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 057b0493f..1c7f0bab4 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2048,8 +2048,11 @@ const MessageTray = new Lang.Class({ if (haveClickedSummaryItem && !summarySourceIsMainNotificationSource && canShowSummaryBoxPointer && !requestedNotificationStackIsEmpty) this._showSummaryBoxPointer(); } else if (this._summaryBoxPointerState == State.SHOWN) { - if (!haveClickedSummaryItem || !canShowSummaryBoxPointer || wrongSummaryBoxPointer || mustHideSummary) + if (!haveClickedSummaryItem || !canShowSummaryBoxPointer || wrongSummaryBoxPointer || mustHideSummary) { this._hideSummaryBoxPointer(); + if (wrongSummaryBoxPointer) + this._showSummaryBoxPointer(); + } } // Tray itself @@ -2390,9 +2393,8 @@ const MessageTray = new Lang.Class({ } this._summaryBoxPointerState = State.HIDING; - // Unset this._clickedSummaryItem if we are no longer showing the summary or if - // this._clickedSummaryItem is still the item associated with the currently showing box pointer - if (this._summaryState != State.SHOWN || this._summaryBoxPointerItem == this._clickedSummaryItem) + // Unset this._clickedSummaryItem if we are no longer showing the summary + if (this._summaryState != State.SHOWN) this._unsetClickedSummaryItem(); this._focusGrabber.ungrabFocus();