diff options
author | Peter Hofmann <scm@uninformativ.de> | 2014-06-14 21:57:04 +0200 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2014-06-14 21:57:04 +0200 |
commit | c32e64b89186c09c5d2c9f82a18e0a541dd414b4 (patch) | |
tree | df2d359da80b67be492c07888a81243ced06b242 | |
parent | bc890973b214053820afc8e6be0d09d8441c9864 (diff) | |
download | lariza-c32e64b89186c09c5d2c9f82a18e0a541dd414b4.tar.gz |
Deal with race conditions while embedding
I have not encountered any race conditions. In theory, they could
happen, though.
-rw-r--r-- | zea.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -230,6 +230,15 @@ zea_new_client(const gchar *uri) else { c->win = gtk_plug_new(embed); + while (!gtk_plug_get_embedded(GTK_PLUG(c->win))) + { + fprintf(stderr, "zea: Not yet embedded! Waiting a second...\n"); + sleep(1); + + if (c->win != NULL) + gtk_widget_destroy(c->win); + c->win = gtk_plug_new(embed); + } } /* When using Gtk2, zea only shows a white area when run in |