summaryrefslogtreecommitdiff
path: root/gui/glabel.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 03:33:26 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 03:38:52 -0300
commit9b7c0095a946cbfc737a3370e05e16f8e1ea261e (patch)
tree3fe75e5a08c9037b09dbe8d4580563b7b293b33f /gui/glabel.c
parent6315c2dc1bfb9124aac44b5a2c058eef454b2d27 (diff)
downloadeeshow-9b7c0095a946cbfc737a3370e05e16f8e1ea261e.tar.gz
eeshow-9b7c0095a946cbfc737a3370e05e16f8e1ea261e.tar.bz2
eeshow-9b7c0095a946cbfc737a3370e05e16f8e1ea261e.zip
eeshow/gui/glabel.c (add_dest_frame): make sheet destinations related to frame
Diffstat (limited to 'gui/glabel.c')
-rw-r--r--gui/glabel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/glabel.c b/gui/glabel.c
index 11ff492..ccb76f6 100644
--- a/gui/glabel.c
+++ b/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);
}