From dc13e72b89bed4feddcfd0d6a5345f806136714f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 30 Aug 2012 18:14:24 +0200 Subject: [PATCH] messageTray: Use monitor geometry for dwelling In multi-monitor setups, the screen might extend below the edge of the monitor that holds the tray. In that case the tray is currently triggered from a secondary monitor, which is rather surprising; change the check to use the correct monitor geometry instead. https://bugzilla.gnome.org/show_bug.cgi?id=683044 --- js/ui/messageTray.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 52bb0e176..2d7ef8ea2 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1497,7 +1497,10 @@ const MessageTray = new Lang.Class({ }, _checkTrayDwell: function(x, y) { - if (y == global.screen_height - 1) { + let monitor = Main.layoutManager.bottomMonitor; + let shouldDwell = (x >= monitor.x && x <= monitor.x + monitor.width && + y == monitor.y + monitor.height - 1); + if (shouldDwell) { // We only set up dwell timeout when the user is not hovering over the tray // (!this.actor.hover). This avoids bringing up the message tray after the // user clicks on a notification with the pointer on the bottom pixel