From bc0ae8ed6752f0975d90d9e73c7274523493e43c Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 19 Aug 2016 03:33:26 -0300 Subject: [PATCH] eeshow/gui/glabel.c (add_dest_frame): make sheet destinations related to frame --- eeshow/gui/glabel.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eeshow/gui/glabel.c b/eeshow/gui/glabel.c index 11ff492..ccb76f6 100644 --- a/eeshow/gui/glabel.c +++ b/eeshow/gui/glabel.c @@ -165,6 +165,20 @@ static void add_dest_frame(struct gui_ctx *ctx) pop_hover, NULL, ctx); overlay_text_raw(over, ""); overlay_style(over, &style); + + /* + * This makes it all work. When we receive a click while hovering, it + * goes to the hovering overlay if that overlay accepts clicks. + * However, if the overlay accepting the click is different, we first + * de-hover. + * + * Now, in the case of the frame overlay, dehovering would destroy the + * destination overlays right before trying to deliver the click. + * + * We solve this by declaring the frame overlay to be "related" to the + * destination overlays. This suppresses dehovering. + */ + overlay_set_related_all(ctx->pop_overlays, over); }