[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH] xrandr: Check if clone's state matches before connecting crtc
From: Dasith Gunawardhana <dasith.gunawardhana () gmail ! com>
Date: 2017-11-22 5:01:23
Message-ID: 20171122050123.24827-1-dasith.gunawardhana () gmail ! com
[Download RAW message or body]
Fixes bug: If an output's clone has already been connected to a crtc then the
current output will be connected to that crtc without checking
mismatched state (i.e. different positions).
Signed-off-by: Dasith Gunawardhana <dasith.gunawardhana@gmail.com>
---
xrandr.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/xrandr.c b/xrandr.c
index 2d4cb72..683ffda 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -1957,6 +1957,18 @@ check_crtc_for_output (crtc_t *crtc, output_t *output)
/* not on the list, can't clone */
if (l == output->output_info->nclone)
return False;
+
+ /* make sure the state matches the clone's state */
+ if (other->mode_info != output->mode_info)
+ return False;
+ if (other->x != output->x)
+ return False;
+ if (other->y != output->y)
+ return False;
+ if (other->rotation != output->rotation)
+ return False;
+ if (!equal_transform (&other->transform, &output->transform))
+ return False;
}
if (crtc->noutput)
--
2.15.0
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic