Commit 34dfd591 authored by Attilio Fiandrotti's avatar Attilio Fiandrotti

Fixed memory leak at window closing in DirectFB backend, patch provided by Simon Lanzmich

svn path=/trunk/; revision=18459
parent 508baa25
2007-07-12 Attilio Fiandrotti <attilio.fiandrotti@gmail.com>
* gdk/directfb/gdkevents-directfb.c:
* gdk/directfb/gdkwindow-directfb.c:
* gdk/directfb/gdkprivate-directfb.h: Fixed memory leak at window closing,
patch provided by Simon Lanzmich
Thu Jul 12 18:03:02 2007 Tim Janik <timj@gtk.org>
* gdk/gdk.c (gdk_threads_add_idle_full): clarified documentation example.
......
......@@ -315,6 +315,25 @@ gdk_directfb_event_windows_add (GdkWindow *window)
impl->window->CreateEventBuffer (impl->window, &EventBuffer);
}
#if (DIRECTFB_MAJOR_VERSION >= 1)
void
gdk_directfb_event_windows_remove (GdkWindow *window)
{
GdkWindowImplDirectFB *impl;
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
if (!impl->window)
return;
if (EventBuffer)
impl->window->DetachEventBuffer (impl->window, EventBuffer);
/* FIXME: should we warn if (! EventBuffer) ? */
}
#endif
GdkWindow *
gdk_directfb_child_at (GdkWindow *window,
gint *winx,
......
......@@ -231,6 +231,9 @@ GdkImage* _gdk_directfb_copy_to_image (GdkDrawable *drawable,
gint height);
void gdk_directfb_event_windows_add (GdkWindow *window);
#if (DIRECTFB_MAJOR_VERSION >= 1)
void gdk_directfb_event_windows_remove (GdkWindow *window);
#endif
GdkGrabStatus gdk_directfb_pointer_grab (GdkWindow *window,
gint owner_events,
......
......@@ -600,7 +600,9 @@ _gdk_windowing_window_destroy (GdkWindow *window,
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
_gdk_selection_window_destroyed (window);
#if (DIRECTFB_MAJOR_VERSION >= 1)
gdk_directfb_event_windows_remove (window);
#endif
if (window == _gdk_directfb_pointer_grab_window)
gdk_pointer_ungrab (GDK_CURRENT_TIME);
if (window == _gdk_directfb_keyboard_grab_window)
......
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