[PATCH 08/12] compositor: Move all clone outputs when move master outptu

Xiong Zhang xiong.y.zhang at intel.com
Fri Mar 7 00:27:26 PST 2014


Signed-off-by: Xiong Zhang <xiong.y.zhang at intel.com>
---
 src/compositor.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 402ac75..c9fe06c 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3294,8 +3294,8 @@ weston_output_init_geometry(struct weston_output *output, int x, int y)
 WL_EXPORT void
 weston_output_move(struct weston_output *output, int x, int y)
 {
-	pixman_region32_t old_region;
 	struct wl_resource *resource;
+	struct weston_output *clone;
 
 	output->move_x = x - output->x;
 	output->move_y = y - output->y;
@@ -3303,9 +3303,6 @@ weston_output_move(struct weston_output *output, int x, int y)
 	if (output->move_x == 0 && output->move_y == 0)
 		return;
 
-	pixman_region32_init(&old_region);
-	pixman_region32_copy(&old_region, &output->region);
-
 	weston_output_init_geometry(output, x, y);
 
 	output->dirty = 1;
@@ -3324,6 +3321,10 @@ weston_output_move(struct weston_output *output, int x, int y)
 					output->make,
 					output->model,
 					output->transform);
+
+	/* Move the associated clone outputs. */
+	wl_list_for_each(clone, &output->clone_output_list, link)
+		weston_output_move(clone, x, y);
 }
 
 WL_EXPORT void
-- 
1.8.3.2



More information about the wayland-devel mailing list