Skip to content

Commit

Permalink
Fixed vurtun#657 contextual activation code
Browse files Browse the repository at this point in the history
  • Loading branch information
vurtun committed Apr 4, 2018
1 parent 60bd95c commit d374953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -16894,6 +16894,8 @@ nk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,
NK_ASSERT(ctx->current->layout);
if (!ctx || !ctx->current || !ctx->current->layout)
return 0;
if (ctx->current != ctx->active)
return 0;

win = ctx->current;
++win->popup.con_count;
Expand Down
2 changes: 2 additions & 0 deletions src/nuklear_contextual.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ nk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,
NK_ASSERT(ctx->current->layout);
if (!ctx || !ctx->current || !ctx->current->layout)
return 0;
if (ctx->current != ctx->active)
return 0;

win = ctx->current;
++win->popup.con_count;
Expand Down

0 comments on commit d374953

Please sign in to comment.