gtk+ r21833 - in trunk: . gdk/x11
- From: cdywan svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21833 - in trunk: . gdk/x11
- Date: Sun, 30 Nov 2008 05:28:28 +0000 (UTC)
Author: cdywan
Date: Sun Nov 30 05:28:28 2008
New Revision: 21833
URL: http://svn.gnome.org/viewvc/gtk+?rev=21833&view=rev
Log:
2008-11-30 Christian Dywan <christian imendio com>
Bug 554076 â eventually release g_new-ed supported_atoms
* gdk/x11/gdkevents-x11.c (cleanup_atoms),
(gdk_x11_screen_supports_net_wm_hint): Set cleanup callback.
Patch by Caolan McNamara.
Modified:
trunk/ChangeLog
trunk/gdk/x11/gdkevents-x11.c
Modified: trunk/gdk/x11/gdkevents-x11.c
==============================================================================
--- trunk/gdk/x11/gdkevents-x11.c (original)
+++ trunk/gdk/x11/gdkevents-x11.c Sun Nov 30 05:28:28 2008
@@ -2742,6 +2742,15 @@
gulong n_atoms;
};
+static void
+cleanup_atoms(gpointer data)
+{
+ NetWmSupportedAtoms *supported_atoms = data;
+ if (supported_atoms->atoms)
+ XFree (supported_atoms->atoms);
+ g_free (supported_atoms);
+}
+
/**
* gdk_x11_screen_supports_net_wm_hint:
* @screen: the relevant #GdkScreen.
@@ -2787,7 +2796,7 @@
if (!supported_atoms)
{
supported_atoms = g_new0 (NetWmSupportedAtoms, 1);
- g_object_set_data (G_OBJECT (screen), "gdk-net-wm-supported-atoms", supported_atoms);
+ g_object_set_data_full (G_OBJECT (screen), "gdk-net-wm-supported-atoms", supported_atoms, cleanup_atoms);
}
fetch_net_wm_check_window (screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]