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
This commit is contained in:
Florian Müllner 2012-08-30 18:14:24 +02:00
parent 2beff9896a
commit dc13e72b89

View File

@ -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