Skip to content
This repository was archived by the owner on Dec 2, 2019. It is now read-only.

Commit d374953

Browse files
committed
Fixed #657 contextual activation code
1 parent 60bd95c commit d374953

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

nuklear.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16894,6 +16894,8 @@ nk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,
1689416894
NK_ASSERT(ctx->current->layout);
1689516895
if (!ctx || !ctx->current || !ctx->current->layout)
1689616896
return 0;
16897+
if (ctx->current != ctx->active)
16898+
return 0;
1689716899

1689816900
win = ctx->current;
1689916901
++win->popup.con_count;

src/nuklear_contextual.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ nk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,
2525
NK_ASSERT(ctx->current->layout);
2626
if (!ctx || !ctx->current || !ctx->current->layout)
2727
return 0;
28+
if (ctx->current != ctx->active)
29+
return 0;
2830

2931
win = ctx->current;
3032
++win->popup.con_count;

0 commit comments

Comments
 (0)