[gnome-shell] messageTray: Use monitor geometry for dwelling



commit dc13e72b89bed4feddcfd0d6a5345f806136714f
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Aug 30 18:14:24 2012 +0200

    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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 52bb0e1..2d7ef8e 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]