summaryrefslogtreecommitdiff
path: root/gui/glabel.c
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 /gui/glabel.c
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
Diffstat (limited to 'gui/glabel.c')
-rw-r--r--gui/glabel.c24
1 files changed, 24 insertions, 0 deletions
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;