Commit e0ce0916 authored by Christian Dywan's avatar Christian Dywan Committed by Christian Dywan
Browse files

Bug 554076 – eventually release g_new-ed supported_atoms

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.

svn path=/trunk/; revision=21833
parent 2dea9208
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.
2008-11-30 Christian Dywan <christian@imendio.com>
Bug 539263 – Deprecate gdk_window_get_toplevels
......
......@@ -2742,6 +2742,15 @@ struct _NetWmSupportedAtoms
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 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment