bonobo_get_object_async (take 2)...
- From: michael meeks <michael meeks novell com>
- To: Mark McLoughlin <markmc redhat com>
- Cc: bonobo <gnome-components-list gnome org>, Rodrigo Moya <rodrigo novell com>
- Subject: bonobo_get_object_async (take 2)...
- Date: Fri, 03 Feb 2006 15:03:59 +0000
Hi Mark,
Please find attached trivial patch to gnome-session making the vino
activation (more) truly async & hence not blocking login etc. until it's
started :-) [ should also avoid loading those pesky moniker libraries
too I think ;-] (can I/Rodrigo commit & to the stable branch too ?).
Rodrigo is also looking at the panel which uses the same method (with
commensurate performance problems I'd guess) - hopefully we can get an
easy win there too.
However - the root cause of this (a hang at login) seems related to
VINO: my suggested patch is here:
--- ./server/vino-shell.c
+++ ./server/vino-shell.c
@@ -50,7 +50,8 @@
shell = g_object_new (vino_shell_get_type (), NULL);
display_name = g_strdup (gdk_display_get_name (gdk_display_get_default ()));
-
+
+#if 0
/* Strip off the screen portion of the display */
p = strrchr (display_name, ':');
if (p)
@@ -59,6 +60,7 @@
if (p)
p [0] = '\0';
}
+#endif
reg_env = bonobo_activation_registration_env_set (reg_env, "DISPLAY", display_name);
result = bonobo_activation_register_active_server (VINO_SERVER_IID,
Briefly - why is that mangling of the DISPLAY variable necessary ? I
must confess that even without it vino fails to launch properly ;-) so
is there some cockup with gnome-session & the way it activates stuff
too ?
Curious as to why that sort of thing might be necessary ? perhaps the
vino cvs annotations make that clear ?
HTH,
Michael.
--
michael meeks novell com <><, Pseudo Engineer, itinerant idiot
--- ./gnome-session/gsm-remote-desktop.c
+++ ./gnome-session/gsm-remote-desktop.c
@@ -111,10 +111,12 @@
}
static void
-remote_desktop_obj_activated (Bonobo_Unknown object,
- CORBA_Environment *ev,
- RemoteDesktopData *data)
+remote_desktop_obj_activated (CORBA_Object object,
+ const char *error_reason,
+ gpointer user_data)
{
+ RemoteDesktopData *data = user_data;
+
g_return_if_fail (data->obj == CORBA_OBJECT_NIL);
g_return_if_fail (data->activating == TRUE);
@@ -123,11 +125,10 @@
if (object == CORBA_OBJECT_NIL)
{
- if (BONOBO_EX (ev))
+ if (error_reason)
{
gsm_warning (G_STRLOC ": activation of %s failed: %s\n",
- REMOTE_DESKTOP_IID,
- bonobo_exception_general_error_get (ev));
+ REMOTE_DESKTOP_IID, error_reason);
}
else
{
@@ -213,11 +214,9 @@
setup_per_display_activation ();
- bonobo_get_object_async (REMOTE_DESKTOP_IID,
- "IDL:Bonobo/Unknown:1.0",
- &ev,
- (BonoboMonikerAsyncFn) remote_desktop_obj_activated,
- data);
+ bonobo_activation_activate_from_id_async
+ ( REMOTE_DESKTOP_IID, 0,
+ &remote_desktop_obj_activated, data, &ev );
if (BONOBO_EX (&ev))
{
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]