summaryrefslogtreecommitdiff
path: root/gui/glabel.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 05:50:26 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 05:51:05 -0300
commited495de88430ef58697edbbdcc2135ce8107f163 (patch)
tree66b8d3c112442a4127160b6fdf83e0c91c5e8d29 /gui/glabel.c
parent791a6a790500ae48fa900ca325db8814c47e5709 (diff)
downloadeeshow-ed495de88430ef58697edbbdcc2135ce8107f163.tar.gz
eeshow-ed495de88430ef58697edbbdcc2135ce8107f163.tar.bz2
eeshow-ed495de88430ef58697edbbdcc2135ce8107f163.zip
eeshow/gui/glabel.c: allow other glabels to replace pop-up
Diffstat (limited to 'gui/glabel.c')
-rw-r--r--gui/glabel.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gui/glabel.c b/gui/glabel.c
index 0f0619e..d4f8d96 100644
--- a/gui/glabel.c
+++ b/gui/glabel.c
@@ -69,6 +69,7 @@ void dehover_glabel(struct gui_ctx *ctx)
{
overlay_remove_all(&ctx->pop_overlays);
overlay_remove_all(&ctx->pop_underlays);
+ ctx->pop_origin = NULL;
redraw(ctx);
}
@@ -194,14 +195,20 @@ static bool hover_glabel(void *user, bool on)
dehover_glabel(ctx);
return 1;
}
- if (ctx->pop_underlays)
- return 0;
+ if (ctx->pop_underlays) {
+ if (ctx->pop_origin == aoi_ctx)
+ return 0;
+ dehover_glabel(ctx);
+ }
+
GtkAllocation alloc;
int sx, sy, ex, ey, mx, my;
unsigned n = 0;
struct gui_sheet *sheet;
+ ctx->pop_origin = aoi_ctx;
+
aoi_dehover();
overlay_remove_all(&ctx->pop_overlays);
overlay_remove_all(&ctx->pop_underlays);