|author||Werner Almesberger <email@example.com>||2016-08-19 06:05:42 -0300|
|committer||Werner Almesberger <firstname.lastname@example.org>||2016-08-19 06:05:42 -0300|
eeshow/TODO, gui/glabel.c (hover_glabel): update TODO; explain hanging pop-ups
2 files changed, 25 insertions, 2 deletions
@@ -63,9 +63,8 @@ GUI/sheets:
fails (reserved hotkeys: Left/Right)
-- draw list of destinations in nicer style
-- indicate current sheet (just for reference) among destinations
- maybe indicate how many times label is used on each sheet
- maybe indicate how it is used
- highlight occurrences of label on current sheet
- also highlight after jumping
+- there can be "hanging" pop-ups, see comment in gui/glabel.c:hover_glabel
diff --git a/gui/glabel.c b/gui/glabel.c
index d4f8d96..550340e 100644
@@ -242,6 +242,30 @@ static bool hover_glabel(void *user, bool on)
ctx->pop_dy = -1;
+ * @@@ The idea is to get input to trigger hovering over the pop-up.
+ * However, this doesn't work because the overlay has not been drawn
+ * yet and therefore has not created its AoI. We therefore only get a
+ * chance to begin hovering at the next motion update, which may
+ * already be outside the pop-up.
+ * Probably the only way to fix this is by making overlay_add do the
+ * layout calculation and create the AoI immediately.
+ * Another problem occurs as deep zoom levels, when the label is larger
+ * than the pop-up. Then we can trigger pop-up creation from a location
+ * that will be outside the pop-up.
+ * We could fix this by aligning the pop-up with the mouse position
+ * instead the box, either in general, or in this specific case. Not
+ * sure if it's worth the trouble, though.
+ * Both issues result in a "hanging" pop-up because AoI (and input)
+ * don't even know we're hovering. The pop-up can be cleared by
+ * - hovering into it,
+ * - hovering over some other glabel, or
+ * - clicking.