From ff03d8dd2a4827c3b81657a1b9b3c9767481bba2 Mon Sep 17 00:00:00 2001 From: Uri Lublin Date: Mon, 8 Jul 2013 16:17:27 +0300 Subject: [PATCH] server/tests: test_display_base: set rect according to appropriate surface When surface_id == 0, primary is used. Otherwise (currently 1), secondary is used. Also, remove unused test_width and test_height. Since commit caea7699434c20dceef8fc79d21b8eeb663fbf53, test->width and test->height are used. --- server/tests/test_display_base.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c index b4c93f34..ad2c687e 100644 --- a/server/tests/test_display_base.c +++ b/server/tests/test_display_base.c @@ -48,9 +48,6 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update) free(update); } -static uint32_t test_width; -static uint32_t test_height; - #define DEFAULT_WIDTH 640 #define DEFAULT_HEIGHT 320 @@ -507,9 +504,9 @@ static void produce_command(Test *test) case SIMPLE_UPDATE: { QXLRect rect = { .left = 0, - .right = (test->target_surface == 0 ? test_width : SURF_WIDTH), + .right = (test->target_surface == 0 ? test->primary_width : test->width), .top = 0, - .bottom = (test->target_surface == 0 ? test_height : SURF_HEIGHT) + .bottom = (test->target_surface == 0 ? test->primary_height : test->height) }; if (rect.right > 0 && rect.bottom > 0) { qxl_worker->update_area(qxl_worker, test->target_surface, &rect, NULL, 0, 1);