mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-06 21:20:25 +01:00
tests: xdg-client-helper: Add maybe_ack_configure() helper
So users are not forced to use xdg_surface_commit_solid(). Signed-off-by: Robert Mader <robert.mader@collabora.com>
This commit is contained in:
parent
a1c0d33700
commit
18076228d3
2 changed files with 15 additions and 5 deletions
|
|
@ -161,6 +161,17 @@ xdg_surface_wait_configure(struct xdg_surface_data *xdg_surface)
|
||||||
test_assert_u32_gt(xdg_surface->configure.serial, 0);
|
test_assert_u32_gt(xdg_surface->configure.serial, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xdg_surface_maybe_ack_configure(struct xdg_surface_data *xdg_surface)
|
||||||
|
{
|
||||||
|
if (xdg_surface->configure.serial == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
xdg_surface_ack_configure(xdg_surface->xdg_surface,
|
||||||
|
xdg_surface->configure.serial);
|
||||||
|
xdg_surface->configure.serial = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xdg_surface_commit_solid(struct xdg_surface_data *xdg_surface,
|
xdg_surface_commit_solid(struct xdg_surface_data *xdg_surface,
|
||||||
uint8_t r, uint8_t g, uint8_t b)
|
uint8_t r, uint8_t g, uint8_t b)
|
||||||
|
|
@ -191,11 +202,7 @@ xdg_surface_commit_solid(struct xdg_surface_data *xdg_surface,
|
||||||
wl_surface_damage_buffer(xdg_surface->surface->wl_surface,
|
wl_surface_damage_buffer(xdg_surface->surface->wl_surface,
|
||||||
0, 0, width, height);
|
0, 0, width, height);
|
||||||
|
|
||||||
if (xdg_surface->configure.serial > 0) {
|
xdg_surface_maybe_ack_configure(xdg_surface);
|
||||||
xdg_surface_ack_configure(xdg_surface->xdg_surface,
|
|
||||||
xdg_surface->configure.serial);
|
|
||||||
xdg_surface->configure.serial = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
xdg_surface->surface->width = width;
|
xdg_surface->surface->width = width;
|
||||||
xdg_surface->surface->height = height;
|
xdg_surface->surface->height = height;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@ xdg_surface_make_toplevel(struct xdg_surface_data *xdg_surface,
|
||||||
void
|
void
|
||||||
xdg_surface_wait_configure(struct xdg_surface_data *xdg_surface);
|
xdg_surface_wait_configure(struct xdg_surface_data *xdg_surface);
|
||||||
|
|
||||||
|
void
|
||||||
|
xdg_surface_maybe_ack_configure(struct xdg_surface_data *xdg_surface);
|
||||||
|
|
||||||
struct xdg_surface_data *
|
struct xdg_surface_data *
|
||||||
create_xdg_surface(struct xdg_client *xdg_client);
|
create_xdg_surface(struct xdg_client *xdg_client);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue