summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 06:05:42 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 06:05:42 -0300
commit883ec0aa8adfe5af17a97ea328f0c55f935559db (patch)
tree18c85eeb34dff73cc33b14574843517159fa2c8b
parented495de88430ef58697edbbdcc2135ce8107f163 (diff)
downloadeeshow-883ec0aa8adfe5af17a97ea328f0c55f935559db.tar.gz
eeshow-883ec0aa8adfe5af17a97ea328f0c55f935559db.tar.bz2
eeshow-883ec0aa8adfe5af17a97ea328f0c55f935559db.zip
eeshow/TODO, gui/glabel.c (hover_glabel): update TODO; explain hanging pop-ups
-rw-r--r--TODO3
-rw-r--r--gui/glabel.c24
2 files changed, 25 insertions, 2 deletions
diff --git a/TODO b/TODO
index 63ae919..9605101 100644
--- a/TODO
+++ b/TODO
@@ -63,9 +63,8 @@ GUI/sheets:
fails (reserved hotkeys: Left/Right)
GUI/glabels:
-- 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
--- a/gui/glabel.c
+++ b/gui/glabel.c
@@ -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.
+ */
input_update();
redraw(ctx);
return 0;