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

Commit b2c70e2

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

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
@@ -28,6 +28,8 @@ nk_contextual_begin(struct nk_context *ctx, nk_flags flags, struct nk_vec2 size,
2828

2929
win = ctx->current;
3030
++win->popup.con_count;
31+
if (win != ctx->active)
32+
return 0;
3133

3234
/* check if currently active contextual is active */
3335
popup = win->popup.win;

0 commit comments

Comments
 (0)