[gnome-shell] layoutManager: Ignore 1px overlap in _isAboveOrBelowPrimary()
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] layoutManager: Ignore 1px overlap in _isAboveOrBelowPrimary()
- Date: Tue, 11 Oct 2011 14:21:09 +0000 (UTC)
commit 1a8d78212fcdcda185c93d4fe45324b560da9de3
Author: Florian MÃllner <fmuellner gnome org>
Date: Mon Oct 10 19:21:18 2011 +0200
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 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index aad4bbb..04e8e4a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]