From 2572a8f1138c1e0ecef861f28fd8058c83917d1c Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 13 Aug 2021 20:04:45 +0000 Subject: [PATCH] Check callback needs to only return 0 (text should be suppressed) if menu returns 0, otherwise it should check the popup also. --- usr.bin/tmux/popup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/tmux/popup.c b/usr.bin/tmux/popup.c index 56e7c46d965..f99bad465ef 100644 --- a/usr.bin/tmux/popup.c +++ b/usr.bin/tmux/popup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popup.c,v 1.30 2021/08/13 19:55:11 nicm Exp $ */ +/* $OpenBSD: popup.c,v 1.31 2021/08/13 20:04:45 nicm Exp $ */ /* * Copyright (c) 2020 Nicholas Marriott @@ -162,12 +162,12 @@ popup_check_cb(struct client *c, void *data, u_int px, u_int py) { struct popup_data *pd = data; + if (pd->md != NULL && menu_check_cb(c, pd->md, px, py) == 0) + return (0); if (px < pd->px || px > pd->px + pd->sx - 1) return (1); if (py < pd->py || py > pd->py + pd->sy - 1) return (1); - if (pd->md != NULL) - return (menu_check_cb(c, pd->md, px, py)); return (0); } -- 2.20.1