As a quasi-hack, do a gdk_flush() when the shell view is unrealized so

2000-07-10  Federico Mena Quintero  <federico@helixcode.com>

	* 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
This commit is contained in:
Federico Mena Quintero
2000-07-10 09:30:28 +00:00
committed by Federico Mena Quintero
parent f587f3d4a5
commit 84ba8642c5
6 changed files with 41 additions and 2 deletions

View File

@ -89,6 +89,7 @@ main (int argc, char **argv)
component_factory_init ();
bonobo_main ();
fprintf (stderr, "main(): Out of bonobo_main(), we are dying cleanly. Have a nice day.\n");
return 0;
}

View File

@ -560,6 +560,8 @@ cal_destroy_cb (GtkObject *object, gpointer data)
IMCPrivate *priv;
GList *l;
fprintf (stderr, "cal_destroy_cb(): A Cal was destroyed!\n");
cal = CAL (object);
cbimc = CAL_BACKEND_IMC (data);

View File

@ -274,6 +274,8 @@ backend_last_client_gone_cb (CalBackend *backend, gpointer data)
gboolean result;
GnomeVFSURI *orig_uri;
fprintf (stderr, "backend_last_client_gone_cb() called!\n");
factory = CAL_FACTORY (data);
priv = factory->priv;

View File

@ -1,3 +1,13 @@
2000-07-10 Federico Mena Quintero <federico@helixcode.com>
* 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.
2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
* e-shell-view.c (e_shell_view_display_uri): Don't update the

View File

@ -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]

View File

@ -40,8 +40,10 @@ static gboolean
termination_handler (gpointer data)
{
if (cal_factory_get_n_backends (cal_factory) == 0
&& pas_book_factory_get_n_backends (pas_book_factory) == 0)
&& pas_book_factory_get_n_backends (pas_book_factory) == 0) {
fprintf (stderr, "termination_handler(): Terminating the Wombat. Have a nice day.\n");
gtk_main_quit ();
}
termination_handler_id = 0;
return FALSE;
@ -94,6 +96,7 @@ setup_pas (int argc, char **argv)
static void
last_calendar_gone_cb (CalFactory *factory, gpointer data)
{
fprintf (stderr, "last_calendar_gone_cb() called! Queueing termination...\n");
queue_termination ();
}