Skip to content

Commit

Permalink
fix #735
Browse files Browse the repository at this point in the history
  • Loading branch information
riri authored and RobLoach committed Nov 18, 2024
1 parent 7c77328 commit 628fa63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demo/xcb_cairo/nuklear_xcb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Nuklear XCB/Cairo Render Backend - v0.0.2
* Copyright 2021 Richard Gill
*
*
* Grabbed and adapted from https://github.com/griebd/nuklear_xcb
* Copyright 2017 Adriano Grieb
*
Expand Down Expand Up @@ -378,7 +378,7 @@ NK_API int nk_xcb_handle_event(struct nk_xcb_context *xcb_ctx, struct nk_context
xcb_client_message_event_t *cm = (xcb_client_message_event_t *)event;
if (cm->data.data32[0] == xcb_ctx->del_atom->atom)
{
return NK_XCB_EVENT_STOP;
events = NK_XCB_EVENT_STOP;
}
}
break;
Expand All @@ -388,7 +388,7 @@ NK_API int nk_xcb_handle_event(struct nk_xcb_context *xcb_ctx, struct nk_context
}
free(event);
}
while ((event = xcb_poll_for_event(xcb_ctx->conn)));
while ((events != NK_XCB_EVENT_STOP) && (event = xcb_poll_for_event(xcb_ctx->conn)));
nk_input_end(nk_ctx);

return events;
Expand Down Expand Up @@ -802,7 +802,7 @@ NK_API int nk_cairo_render(struct nk_cairo_context *cairo_ctx, struct nk_context
/* the coordinates system in cairo is not intuitive, scale, translate,
* are applied to source. Refer to
* "https://www.cairographics.org/FAQ/#paint_from_a_surface" for details
*
*
* if you set source_origin to (0,0), it would be like source origin
* aligned to dest origin, then if you draw a rectangle on (x, y, w, h).
* it would clip out the (x, y, w, h) of the source on you dest as well.
Expand Down

0 comments on commit 628fa63

Please sign in to comment.