From 1a8d78212fcdcda185c93d4fe45324b560da9de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 10 Oct 2011 19:21:18 +0200 Subject: [PATCH] layoutManager: Ignore 1px overlap in _isAboveOrBelowPrimary() Nvidia's twin view option does not align monitors properly, but with a one pixel overlap. It looks safe to ignore an overlap this small to make this case work. https://bugzilla.gnome.org/show_bug.cgi?id=661387 --- js/ui/layout.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index aad4bbbd6..04e8e4ab5 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -216,10 +216,10 @@ LayoutManager.prototype = { let monitorLeft = monitor.x, monitorRight = monitor.x + monitor.width; let primaryLeft = primary.x, primaryRight = primary.x + primary.width; - if ((monitorLeft >= primaryLeft && monitorLeft <= primaryRight) || - (monitorRight >= primaryLeft && monitorRight <= primaryRight) || - (primaryLeft >= monitorLeft && primaryLeft <= monitorRight) || - (primaryRight >= monitorLeft && primaryRight <= monitorRight)) + if ((monitorLeft >= primaryLeft && monitorLeft < primaryRight) || + (monitorRight > primaryLeft && monitorRight <= primaryRight) || + (primaryLeft >= monitorLeft && primaryLeft < monitorRight) || + (primaryRight > monitorLeft && primaryRight <= monitorRight)) return true; return false;