aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-07-14 21:37:36 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-07-14 21:37:36 +0200
commit689a069cc76c818aadccb199a765ad9c952afe82 (patch)
treeb87b9fe912b10f658b4e254382eb331cb1d38874
parent97d908c681593bfad426b4b0e8e298f83670560d (diff)
downloadpatchmatrix-689a069cc76c818aadccb199a765ad9c952afe82.tar.xz
limit right click for contex menu to canvas region.
-rw-r--r--VERSION2
-rw-r--r--patchmatrix_nk.c10
2 files changed, 5 insertions, 7 deletions
diff --git a/VERSION b/VERSION
index 30107f1..cc54414 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.25.19
+0.25.21
diff --git a/patchmatrix_nk.c b/patchmatrix_nk.c
index d8c963d..cd56e3f 100644
--- a/patchmatrix_nk.c
+++ b/patchmatrix_nk.c
@@ -1116,13 +1116,11 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data)
}
nk_menubar_end(ctx);
- const struct nk_rect total_space = nk_window_get_content_region(ctx);
- const float total_h = total_space.h
- - app->dy
- - 2*ctx->style.window.group_padding.y;
+ struct nk_rect total_space = nk_window_get_content_region(ctx);
+ total_space.h -= app->dy + 2*ctx->style.window.group_padding.y;
/* allocate complete window space */
- nk_layout_space_begin(ctx, NK_STATIC, total_h,
+ nk_layout_space_begin(ctx, NK_STATIC, total_space.h,
_hash_size(&app->clients) + _hash_size(&app->conns));
{
const struct nk_rect old_clip = canvas->clip;
@@ -1197,7 +1195,7 @@ _expose(struct nk_context *ctx, struct nk_rect wbounds, void *data)
#ifdef JACK_HAS_METADATA_API
(app->type != TYPE_OSC) && (app->type != TYPE_CV) &&
#endif
- nk_contextual_begin(ctx, 0, nk_vec2(100, 360), nk_window_get_bounds(ctx)))
+ nk_contextual_begin(ctx, 0, nk_vec2(100, 360), total_space))
{
nk_layout_row_dynamic(ctx, app->dy, 1);
if(nk_contextual_item_label(ctx, "Mixer 1x1", NK_TEXT_LEFT))