mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-20 22:20:52 +02:00
xcb: Add a define for some magic number
In X11, errors look like events with response_type == 0. Using a define looks better than just a "trust me!". Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8957e50632
commit
8a65279ee1
1 changed files with 4 additions and 1 deletions
|
|
@ -30,6 +30,9 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
/* Errors have response_type == 0 */
|
||||
#define CAIRO_XCB_ERROR 0
|
||||
|
||||
static const cairo_user_data_key_t xcb_closure_key;
|
||||
|
||||
typedef struct _xcb_target_closure {
|
||||
|
|
@ -592,7 +595,7 @@ _cairo_boilerplate_xcb_finish_surface (cairo_surface_t *surface)
|
|||
return cairo_surface_status (surface);
|
||||
|
||||
while ((ev = xcb_poll_for_event (xtc->c)) != NULL) {
|
||||
if (ev->response_type == 0 /* trust me! */) {
|
||||
if (ev->response_type == CAIRO_XCB_ERROR) {
|
||||
xcb_generic_error_t *error = (xcb_generic_error_t *) ev;
|
||||
|
||||
#if XCB_GENERIC_ERROR_HAS_MAJOR_MINOR_CODES
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue