mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 21:18:05 +02:00
xcb: Handle events in boilerplate
Cairo shouldn't cause any events during a test run. Verify this by explicitly handling events, too. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
f0bb3a29b3
commit
8957e50632
1 changed files with 6 additions and 7 deletions
|
|
@ -592,8 +592,6 @@ _cairo_boilerplate_xcb_finish_surface (cairo_surface_t *surface)
|
|||
return cairo_surface_status (surface);
|
||||
|
||||
while ((ev = xcb_poll_for_event (xtc->c)) != NULL) {
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
|
||||
if (ev->response_type == 0 /* trust me! */) {
|
||||
xcb_generic_error_t *error = (xcb_generic_error_t *) ev;
|
||||
|
||||
|
|
@ -606,13 +604,14 @@ _cairo_boilerplate_xcb_finish_surface (cairo_surface_t *surface)
|
|||
"Detected error during xcb run: %d\n",
|
||||
error->error_code);
|
||||
#endif
|
||||
free (error);
|
||||
|
||||
status = CAIRO_STATUS_WRITE_ERROR;
|
||||
} else {
|
||||
fprintf (stderr,
|
||||
"Detected unexpected event during xcb run: %d\n",
|
||||
ev->response_type);
|
||||
}
|
||||
free (ev);
|
||||
|
||||
if (status)
|
||||
return status;
|
||||
return CAIRO_STATUS_WRITE_ERROR;
|
||||
}
|
||||
|
||||
if (xcb_connection_has_error (xtc->c))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue