summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evbp-plug.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/evbp-plug.c b/src/evbp-plug.c
index 6e74f9a..87e3b06 100644
--- a/src/evbp-plug.c
+++ b/src/evbp-plug.c
@@ -27,9 +27,14 @@
G_DEFINE_TYPE(EvbpPlug, evbp_plug, GTK_TYPE_PLUG)
+static void evbp_plug_unmap(GtkWidget *widget);
+
static void
evbp_plug_class_init(EvbpPlugClass *class)
{
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(class);
+
+ widget_class->unmap = evbp_plug_unmap;
}
static void
@@ -48,3 +53,13 @@ evbp_plug_new(Window socket_id)
socket_id);
return GTK_WIDGET(plug);
}
+
+static void
+evbp_plug_unmap(GtkWidget *widget)
+{
+ /* Hack: destroy the child here to workaround bugs in GtkPlug */
+ g_debug("Destroying child prior to unmapping");
+ gtk_widget_destroy(gtk_bin_get_child(GTK_BIN(widget)));
+
+ GTK_WIDGET_CLASS(evbp_plug_parent_class)->unmap(widget);
+}