summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-13 00:17:43 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-13 00:17:43 (GMT)
commit838de96c89a0ceddc5b41dc47624ccc699a2c6d1 (patch)
tree8d07ae86ff5dbf13d07f098c1525e53cc790f69e
parent1bd37cf2883c5e8ba5075293b8ea63085dff940e (diff)
downloadeeshow-838de96c89a0ceddc5b41dc47624ccc699a2c6d1.zip
eeshow-838de96c89a0ceddc5b41dc47624ccc699a2c6d1.tar.gz
eeshow-838de96c89a0ceddc5b41dc47624ccc699a2c6d1.tar.bz2
gui/glabel.c (hover_glabel), TODO: work around infinite recursion
Calling input_update didn't only fail to work as intended (see long comment before the work-around), but also caused an infinite recursion if we have overlapping global labels. Removing it seems to have no ill effect.
-rw-r--r--TODO2
-rw-r--r--gui/glabel.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/TODO b/TODO
index f56edef..d670ccf 100644
--- a/TODO
+++ b/TODO
@@ -9,7 +9,7 @@ Bugs:
No other problems were observed. "Home" usually solves this.
- when switching from label pop-up to label pop-up (e.g., on Neo900 sheet 20),
the logic may get confused and cause a segfault, apparently as the result of
- infinite recursion
+ infinite recursion [removed call to input_update as work-around]
Parsing and input processing:
- unify alignment, direction
diff --git a/gui/glabel.c b/gui/glabel.c
index 985e2c9..6c748b8 100644
--- a/gui/glabel.c
+++ b/gui/glabel.c
@@ -275,7 +275,15 @@ static bool hover_glabel(void *user, bool on, int dx, int dy)
* - clicking, or
* - pressing Escape.
*/
- input_update();
+
+ /*
+ * @@@ Calling input_update here caused an infinite recursion through
+ * input_update -> hover_consider -> sheet_hover_update -> aoi_hover
+ * -> hover_d -> hover_glabel -> input_update -> etc.
+ * if we have overlapping global labels. The recursion altered between
+ * both AoIs.
+ */
+// input_update();
redraw(gui);
return 0;
}