mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 15:48:00 +02:00
xlib-xcb: Fix api-special-cases test
The functions cairo_xlib_surface_set_size and cairo_xlib_surface_set_drawable didn't set the expected error when called with a finished surface. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
4495e08e9e
commit
59fadcf7d9
1 changed files with 14 additions and 0 deletions
|
|
@ -418,6 +418,11 @@ cairo_xlib_surface_set_size (cairo_surface_t *abstract_surface,
|
|||
|
||||
if (unlikely (abstract_surface->status))
|
||||
return;
|
||||
if (unlikely (abstract_surface->finished)) {
|
||||
status = _cairo_surface_set_error (abstract_surface,
|
||||
_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
|
||||
return;
|
||||
}
|
||||
|
||||
if (surface->base.type != CAIRO_SURFACE_TYPE_XLIB) {
|
||||
status = _cairo_surface_set_error (abstract_surface,
|
||||
|
|
@ -426,6 +431,10 @@ cairo_xlib_surface_set_size (cairo_surface_t *abstract_surface,
|
|||
}
|
||||
|
||||
cairo_xcb_surface_set_size (&surface->xcb->base, width, height);
|
||||
if (unlikely (surface->xcb->base.status)) {
|
||||
status = _cairo_surface_set_error (abstract_surface,
|
||||
_cairo_error (surface->xcb->base.status));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -439,6 +448,11 @@ cairo_xlib_surface_set_drawable (cairo_surface_t *abstract_surface,
|
|||
|
||||
if (unlikely (abstract_surface->status))
|
||||
return;
|
||||
if (unlikely (abstract_surface->finished)) {
|
||||
status = _cairo_surface_set_error (abstract_surface,
|
||||
_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
|
||||
return;
|
||||
}
|
||||
|
||||
if (surface->base.type != CAIRO_SURFACE_TYPE_XLIB) {
|
||||
status = _cairo_surface_set_error (abstract_surface,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue