Two small fixes

Don't leak a session bus reference, and don't assume a display
is X11 just because we've built the X11 backend.
This commit is contained in:
Matthias Clasen 2011-12-11 21:16:24 -05:00 committed by Ryan Lortie
parent d91c9f9859
commit 3103ae2685

View File

@ -220,7 +220,11 @@ gtk_application_shutdown_x11 (GtkApplication *application)
{
g_free (application->priv->window_prefix);
application->priv->window_prefix = NULL;
if (application->priv->session)
{
g_object_unref (application->priv->session);
application->priv->session = NULL;
}
}
#endif
@ -360,6 +364,7 @@ gtk_application_before_emit (GApplication *application,
display = gdk_display_get_default ();
id = g_variant_get_string (value, NULL);
if (GDK_IS_X11_DISPLAY (display))
gdk_x11_display_set_startup_notification_id (display, id);
}
#endif