From 84ba8642c55c514b7fe23aa90fabdbd0d90250ab Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 10 Jul 2000 09:30:28 +0000 Subject: As a quasi-hack, do a gdk_flush() when the shell view is unrealized so 2000-07-10 Federico Mena Quintero * e-shell-view.c (unrealize): As a quasi-hack, do a gdk_flush() when the shell view is unrealized so that the DeleteEvent gets sent to the remote plugs as soon as possible before we start making other CORBA calls. The problem is that our CORBA pipe is synchronous while our X pipe is asynch. We have to ensure ordering for certain operations. This is NOT the correct and complete fix, which should go in Bonobo. svn path=/trunk/; revision=4030 --- shell/e-shell-view.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'shell/e-shell-view.c') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index fc211e8727..36e0becf0d 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -353,6 +353,22 @@ destroy (GtkObject *object) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } +/* Unrealize handler */ +static void +unrealize (GtkWidget *widget) +{ + if (GTK_WIDGET_CLASS (parent_class)->unrealize) + (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); + + /* We flush so that all the destroy window requests for foreign windows + * get sent over the X wire. Hopefully this will diminish the chance of + * hitting the CORBA (sync) vs. Xlib (async) race conditions. This is + * not the complete fix, which should actually be put in Bonobo and + * completed. FIXME. + */ + gdk_flush (); +} + /* Initialization. */ @@ -360,10 +376,15 @@ static void class_init (EShellViewClass *klass) { GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + + object_class = (GtkObjectClass *) klass; + widget_class = (GtkWidgetClass *) klass; - object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = destroy; + widget_class->unrealize = unrealize; + parent_class = gtk_type_class (gnome_app_get_type ()); signals[SHORTCUT_BAR_MODE_CHANGED] -- cgit v1.2.3