mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-12-05 14:31:49 +00:00
Fix 25s startup hang with notification daemons that ignore GetAll
notification_backend_init() created its org.freedesktop.Notifications proxy synchronously with G_DBUS_PROXY_FLAGS_NONE, which makes GDBus call Properties.GetAll and wait for the reply. Some notification daemons (e.g. awesome's naughty) never answer that call, so the UI thread blocked until the 25 second D-Bus default timeout expired, leaving the main window mapped but unpainted. The proxy is only used for GetCapabilities and Notify, so create it with DO_NOT_LOAD_PROPERTIES and DO_NOT_CONNECT_SIGNALS.
This commit is contained in:
1 parent
5952d8f5e2
commit
1b8f80d892
1 file changed
+6
-1
@@ -92,8 +92,13 @@ notification_backend_init (const char **error)
|
|||||||
char **capabilities;
|
char **capabilities;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
/* We never read properties or listen for signals. Loading properties makes
|
||||||
|
* proxy creation block on Properties.GetAll, which some notification
|
||||||
|
* daemons (e.g. awesome's naughty) never answer, freezing startup until
|
||||||
|
* the 25 second D-Bus timeout expires. */
|
||||||
fdo_notifications = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
|
fdo_notifications = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
|
||||||
G_DBUS_PROXY_FLAGS_NONE,
|
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
|
||||||
|
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
|
||||||
NULL,
|
NULL,
|
||||||
"org.freedesktop.Notifications",
|
"org.freedesktop.Notifications",
|
||||||
"/org/freedesktop/Notifications",
|
"/org/freedesktop/Notifications",
|
||||||
|
|||||||
Reference in new issue
Block a user