[gtk+/wip/gmenu] Two small fixes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu] Two small fixes
- Date: Mon, 12 Dec 2011 02:17:56 +0000 (UTC)
commit 86456ffebf614e012d4265606817f426d34ea8d6
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 11 21:16:24 2011 -0500
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.
gtk/gtkapplication.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 8c0deba..ed14aa5 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -220,7 +220,11 @@ gtk_application_shutdown_x11 (GtkApplication *application)
{
g_free (application->priv->window_prefix);
application->priv->window_prefix = NULL;
- application->priv->session = NULL;
+ if (application->priv->session)
+ {
+ g_object_unref (application->priv->session);
+ application->priv->session = NULL;
+ }
}
#endif
@@ -360,7 +364,8 @@ gtk_application_before_emit (GApplication *application,
display = gdk_display_get_default ();
id = g_variant_get_string (value, NULL);
- gdk_x11_display_set_startup_notification_id (display, id);
+ if (GDK_IS_X11_DISPLAY (display))
+ gdk_x11_display_set_startup_notification_id (display, id);
}
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]