[gnome-builder] completion: add re-entrance protection
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] completion: add re-entrance protection
- Date: Tue, 12 Jun 2018 09:49:52 +0000 (UTC)
commit 210b683a77bf4e78f3a28ce0d50f6fb24aaac6a5
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 12 02:46:44 2018 -0700
completion: add re-entrance protection
We can accidentally get into this position during some update phases, so
make sure we block it here.
src/libide/completion/ide-completion.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/completion/ide-completion.c b/src/libide/completion/ide-completion.c
index 3d34b25e4..4bcc525cb 100644
--- a/src/libide/completion/ide-completion.c
+++ b/src/libide/completion/ide-completion.c
@@ -130,6 +130,9 @@ struct _IdeCompletion
*/
guint block_count;
+ /* Re-entrancy protection for ide_completion_show(). */
+ guint showing;
+
/*
* The number of rows to display. This is propagated to the window if/when
* the window is created.
@@ -1381,7 +1384,10 @@ ide_completion_show (IdeCompletion *self)
if (ide_completion_is_blocked (self))
IDE_EXIT;
- g_signal_emit (self, signals [SHOW], 0);
+ self->showing++;
+ if (self->showing == 1)
+ g_signal_emit (self, signals [SHOW], 0);
+ self->showing--;
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]