summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2013-12-02 21:01:53 -0600
committerKristian Høgsberg <krh@bitplanet.net>2013-12-02 22:17:58 -0800
commit918f2dd4cfb8b177f67b45653efbbe4325cbe9dc (patch)
tree3bd3635fc459c545c5ee34adba64656c9bf743d5 /tests
parentfdca95c7db067132b5670cbaa56c4088c2be3f1f (diff)
Remove the weston_view.geometry.width/height fields
This has a couple of additional implications for the internal weston API: 1) weston_view_configure no longer exists. Use weston_view_set_position instead. 2) The weston_surface.configure callback no longer takes a width and height. If you need these, surface.width/height are set before configure is called. If you need to know when the width/height changes, you must track that yourself.
Diffstat (limited to 'tests')
-rw-r--r--tests/surface-global-test.c4
-rw-r--r--tests/surface-test.c4
-rw-r--r--tests/weston-test.c7
3 files changed, 9 insertions, 6 deletions
diff --git a/tests/surface-global-test.c b/tests/surface-global-test.c
index 788e694d..b496635c 100644
--- a/tests/surface-global-test.c
+++ b/tests/surface-global-test.c
@@ -38,7 +38,9 @@ surface_to_from_global(void *data)
assert(surface);
view = weston_view_create(surface);
assert(view);
- weston_view_configure(view, 5, 10, 50, 50);
+ surface->width = 50;
+ surface->height = 50;
+ weston_view_set_position(view, 5, 10);
weston_view_update_transform(view);
weston_view_to_global_float(view, 33, 22, &x, &y);
diff --git a/tests/surface-test.c b/tests/surface-test.c
index 4a8b2b29..80dce81f 100644
--- a/tests/surface-test.c
+++ b/tests/surface-test.c
@@ -38,7 +38,9 @@ surface_transform(void *data)
assert(surface);
view = weston_view_create(surface);
assert(view);
- weston_view_configure(view, 100, 100, 200, 200);
+ surface->width = 200;
+ surface->height = 200;
+ weston_view_set_position(view, 100, 100);
weston_view_update_transform(view);
weston_view_to_global_float(view, 20, 20, &x, &y);
diff --git a/tests/weston-test.c b/tests/weston-test.c
index aebe57d8..fc025fa6 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -75,7 +75,7 @@ notify_pointer_position(struct weston_test *test, struct wl_resource *resource)
}
static void
-test_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy, int32_t width, int32_t height)
+test_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
{
struct weston_test_surface *test_surface = surface->configure_private;
struct weston_test *test = test_surface->test;
@@ -84,9 +84,8 @@ test_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy, i
wl_list_insert(&test->layer.view_list,
&test_surface->view->layer_link);
- weston_view_configure(test_surface->view,
- test_surface->x, test_surface->y,
- width, height);
+ weston_view_set_position(test_surface->view,
+ test_surface->x, test_surface->y);
weston_view_update_transform(test_surface->view);
}