summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
90f159c)
The workaround that was committed for this didn't have the
intended effect, since the timeout was added to the default
main context, not the one that is used in the recursive
mainloop.
Without this patch, my login screen would freeze when hitting
Enter in the password entry, with it, I could successfully log
in 10 out of 10 times.
https://bugzilla.gnome.org/show_bug.cgi?id=658013
DBusPendingCall *pending;
SpiReentrantCallClosure closure;
GMainContext *main_context;
DBusPendingCall *pending;
SpiReentrantCallClosure closure;
GMainContext *main_context;
main_context = (g_getenv ("AT_SPI_CLIENT") ? NULL :
spi_global_app_data->main_context);
main_context = (g_getenv ("AT_SPI_CLIENT") ? NULL :
spi_global_app_data->main_context);
return NULL;
}
dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL);
return NULL;
}
dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL);
- closure.timeout = g_timeout_add (500, timeout_reply, &closure);
+ source = g_timeout_source_new (500);
+ g_source_set_callback (source, timeout_reply, &closure, NULL);
+ closure.timeout = g_source_attach (source, main_context);
+ g_source_unref (source);
g_main_loop_run (closure.loop);
if (closure.timeout != -1)
g_main_loop_run (closure.loop);
if (closure.timeout != -1)
- g_source_remove (closure.timeout);
+ g_source_destroy (source);
g_main_loop_unref (closure.loop);
return closure.reply;
g_main_loop_unref (closure.loop);
return closure.reply;