From 25b743b03cefc9c2d879016f7dcb98673964d7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 27 Mar 2011 17:58:23 +0200 Subject: [PATCH] message-tray: Fix dismissing notifications Commit 31b12635d1 fixed links in notifications again, but blocked clicks on normal labels getting through to the notification. Fix this, so that both links and dismissing notifications work again. https://bugzilla.gnome.org/show_bug.cgi?id=645839 --- js/ui/messageTray.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index f592f4849..f1244a5d0 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -108,12 +108,12 @@ URLHighlighter.prototype = { } this.setMarkup(text, allowMarkup); - this.actor.connect('button-press-event', function() { + this.actor.connect('button-press-event', Lang.bind(this, function(actor, event) { // Keep Notification.actor from seeing this and taking // a pointer grab, which would block our button-release-event - // handler - return true; - }); + // handler, if an URL is clicked + return this._findUrlAtPos(event) != -1; + })); this.actor.connect('button-release-event', Lang.bind(this, function (actor, event) { let urlId = this._findUrlAtPos(event); if (urlId != -1) {