summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2013-07-08 16:17:27 +0300
committerUri Lublin <uril@redhat.com>2013-07-16 23:37:27 +0300
commitff03d8dd2a4827c3b81657a1b9b3c9767481bba2 (patch)
tree0fe591e20607480b266b7df36633089bd0cb2414
parent1960ebb5b391a9633d892c80f84146cdd2c81082 (diff)
downloadspice-ff03d8dd2a4827c3b81657a1b9b3c9767481bba2.tar.gz
spice-ff03d8dd2a4827c3b81657a1b9b3c9767481bba2.tar.xz
spice-ff03d8dd2a4827c3b81657a1b9b3c9767481bba2.zip
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.
-rw-r--r--server/tests/test_display_base.c7
1 files 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);