2
2
*
3
3
* Nuklear XCB/Cairo Render Backend - v0.0.2
4
4
* Copyright 2021 Richard Gill
5
- *
5
+ *
6
6
* Grabbed and adapted from https://github.com/griebd/nuklear_xcb
7
7
* Copyright 2017 Adriano Grieb
8
8
*
@@ -378,7 +378,7 @@ NK_API int nk_xcb_handle_event(struct nk_xcb_context *xcb_ctx, struct nk_context
378
378
xcb_client_message_event_t * cm = (xcb_client_message_event_t * )event ;
379
379
if (cm -> data .data32 [0 ] == xcb_ctx -> del_atom -> atom )
380
380
{
381
- return NK_XCB_EVENT_STOP ;
381
+ events = NK_XCB_EVENT_STOP ;
382
382
}
383
383
}
384
384
break ;
@@ -388,7 +388,7 @@ NK_API int nk_xcb_handle_event(struct nk_xcb_context *xcb_ctx, struct nk_context
388
388
}
389
389
free (event );
390
390
}
391
- while ((event = xcb_poll_for_event (xcb_ctx -> conn )));
391
+ while ((events != NK_XCB_EVENT_STOP ) && ( event = xcb_poll_for_event (xcb_ctx -> conn )));
392
392
nk_input_end (nk_ctx );
393
393
394
394
return events ;
@@ -802,7 +802,7 @@ NK_API int nk_cairo_render(struct nk_cairo_context *cairo_ctx, struct nk_context
802
802
/* the coordinates system in cairo is not intuitive, scale, translate,
803
803
* are applied to source. Refer to
804
804
* "https://www.cairographics.org/FAQ/#paint_from_a_surface" for details
805
- *
805
+ *
806
806
* if you set source_origin to (0,0), it would be like source origin
807
807
* aligned to dest origin, then if you draw a rectangle on (x, y, w, h).
808
808
* it would clip out the (x, y, w, h) of the source on you dest as well.
0 commit comments