From d374953d274131f9f295e5fdada9b9f83e208072 Mon Sep 17 00:00:00 2001 From: vurtun Date: Wed, 4 Apr 2018 16:39:42 +0200 Subject: [PATCH] Fixed #657 contextual activation code --- nuklear.h | 2 ++ src/nuklear_contextual.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nuklear.h b/nuklear.h index 08a1831..07fe7e1 100644 --- a/nuklear.h +++ b/nuklear.h @@ -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; diff --git a/src/nuklear_contextual.c b/src/nuklear_contextual.c index e1bcf6d..1f29e66 100644 --- a/src/nuklear_contextual.c +++ b/src/nuklear_contextual.c @@ -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;