diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index ae3c7799..59b4e119 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -643,7 +643,7 @@ create_focus_surface(struct weston_compositor *ec, struct focus_surface *fsurf = NULL; struct weston_curtain_params curtain_params = { .r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0, - .x = output->pos.c.x, .y = output->pos.c.y, + .pos = output->pos, .width = output->width, .height = output->height, .surface_committed = focus_surface_committed, .get_label = focus_surface_get_label, @@ -1917,7 +1917,7 @@ shell_set_view_fullscreen(struct shell_surface *shsurf) struct weston_output *output = shsurf->fullscreen_output; struct weston_curtain_params curtain_params = { .r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0, - .x = output->pos.c.x, .y = output->pos.c.y, + .pos = output->pos, .width = output->width, .height = output->height, .surface_committed = black_surface_committed, .get_label = black_surface_get_label, @@ -3897,8 +3897,6 @@ shell_fade_create_view(struct desktop_shell *shell) struct shell_output *shell_output; struct weston_curtain_params curtain_params = { .r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0, - .x = 0, .y = 0, - .width = 8192, .height = 8192, .surface_committed = black_surface_committed, .get_label = fade_surface_get_label, .surface_private = shell, @@ -3925,8 +3923,8 @@ shell_fade_create_view(struct desktop_shell *shell) x2 = MAX(x2, op->pos.c.x + op->width); y2 = MAX(y2, op->pos.c.y + op->height); } - curtain_params.x = x1; - curtain_params.y = y1; + curtain_params.pos.c.x = x1; + curtain_params.pos.c.y = y1; curtain_params.width = x2 - x1; curtain_params.height = y2 - y1; curtain = weston_shell_utils_curtain_create(compositor, &curtain_params); diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c index 52810647..1f05daf1 100644 --- a/fullscreen-shell/fullscreen-shell.c +++ b/fullscreen-shell/fullscreen-shell.c @@ -228,11 +228,11 @@ black_surface_committed(struct weston_surface *es, static struct weston_curtain * create_curtain(struct weston_compositor *ec, struct fs_output *fsout, - float x, float y, int w, int h) + struct weston_coord_global pos, int w, int h) { struct weston_curtain_params curtain_params = { .r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0, - .x = x, .y = y, .width = w, .height = h, + .pos = pos, .width = w, .height = h, .surface_committed = black_surface_committed, .get_label = NULL, .surface_private = fsout, @@ -324,7 +324,7 @@ fs_output_create(struct fullscreen_shell *shell, struct weston_output *output) fsout->surface_destroyed.notify = surface_destroyed; fsout->pending.surface_destroyed.notify = pending_surface_destroyed; fsout->curtain = create_curtain(shell->compositor, fsout, - output->pos.c.x, output->pos.c.y, + output->pos, output->width, output->height); fsout->curtain->view->is_mapped = true; weston_layer_entry_insert(&shell->layer.view_list, diff --git a/include/libweston/shell-utils.h b/include/libweston/shell-utils.h index 807371e9..01306c13 100644 --- a/include/libweston/shell-utils.h +++ b/include/libweston/shell-utils.h @@ -36,7 +36,8 @@ struct weston_curtain_params { struct weston_coord_surface new_origin); void *surface_private; float r, g, b, a; - int x, y, width, height; + struct weston_coord_global pos; + int width, height; bool capture_input; }; diff --git a/kiosk-shell/kiosk-shell.c b/kiosk-shell/kiosk-shell.c index dfe40b59..7fc34efe 100644 --- a/kiosk-shell/kiosk-shell.c +++ b/kiosk-shell/kiosk-shell.c @@ -634,8 +634,7 @@ kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput) curtain_params.b = ((bg_color >> 0) & 0xff) / 255.0; curtain_params.a = 1.0; - curtain_params.x = output->pos.c.x; - curtain_params.y = output->pos.c.y; + curtain_params.pos = output->pos; curtain_params.width = output->width; curtain_params.height = output->height; diff --git a/libweston/shell-utils/shell-utils.c b/libweston/shell-utils/shell-utils.c index 12a5723d..5587d44e 100644 --- a/libweston/shell-utils/shell-utils.c +++ b/libweston/shell-utils/shell-utils.c @@ -180,7 +180,6 @@ weston_shell_utils_curtain_create(struct weston_compositor *compositor, struct weston_surface *surface = NULL; struct weston_buffer_reference *buffer_ref; struct weston_view *view; - struct weston_coord_global pos; curtain = zalloc(sizeof(*curtain)); if (curtain == NULL) @@ -222,8 +221,7 @@ weston_shell_utils_curtain_create(struct weston_compositor *compositor, weston_surface_map(surface); - pos.c = weston_coord(params->x, params->y); - weston_view_set_position(view, pos); + weston_view_set_position(view, params->pos); return curtain; diff --git a/tests/safe-signal-output-removal-test.c b/tests/safe-signal-output-removal-test.c index 3ff22599..052bafe0 100644 --- a/tests/safe-signal-output-removal-test.c +++ b/tests/safe-signal-output-removal-test.c @@ -81,7 +81,7 @@ output_create_view(struct test_output *t_output) { struct weston_curtain_params curtain_params = { .r = 0.5, .g = 0.5, .b = 0.5, .a = 1.0, - .x = 0, .y = 0, + .pos.c = weston_coord(0, 0), .width = 320, .height = 240, .get_label = NULL, .surface_committed = NULL, diff --git a/tests/weston-test-desktop-shell.c b/tests/weston-test-desktop-shell.c index 018fcfcc..bd6478e1 100644 --- a/tests/weston-test-desktop-shell.c +++ b/tests/weston-test-desktop-shell.c @@ -217,7 +217,8 @@ wet_shell_init(struct weston_compositor *ec, struct desktest_shell *dts; struct weston_curtain_params background_params = { .r = 0.16, .g = 0.32, .b = 0.48, .a = 1.0, - .x = 0, .y = 0, .width = 2000, .height = 2000, + .pos.c = weston_coord(0, 0), + .width = 2000, .height = 2000, .capture_input = true, .surface_committed = NULL, .get_label = background_get_label,