Merged from trunk:

2009-02-18  Sven Neumann  <sven@gimp.org>

	Merged from trunk:

	Bug 533456 – Memory leak when window is destroyed

	* gdk/directfb/gdkdirectfb.h
	* gdk/directfb/gdkprivate-directfb.h
	* gdk/directfb/gdkcursor-directfb.c
	* gdk/directfb/gdkevents-directfb.c
	* gdk/directfb/gdkwindow-directfb.c: removed all #ifdef checks 
for
	DIRECTFB_MAJOR_VERSION >= 1. We depend on DirectFB >= 1.0.0 now.
	Fixes a potential build issue that would lead to a memory leak 
as
	described in bug #533456.


svn path=/branches/gtk-2-14/; revision=22369
This commit is contained in:
Sven Neumann
2009-02-18 20:46:02 +00:00
committed by Sven Neumann
parent fbcd10e70d
commit d722067aa3
6 changed files with 19 additions and 17 deletions

View File

@@ -1,3 +1,18 @@
2009-02-18 Sven Neumann <sven@gimp.org>
Merged from trunk:
Bug 533456 Memory leak when window is destroyed
* gdk/directfb/gdkdirectfb.h
* gdk/directfb/gdkprivate-directfb.h
* gdk/directfb/gdkcursor-directfb.c
* gdk/directfb/gdkevents-directfb.c
* gdk/directfb/gdkwindow-directfb.c: removed all #ifdef checks for
DIRECTFB_MAJOR_VERSION >= 1. We depend on DirectFB >= 1.0.0 now.
Fixes a potential build issue that would lead to a memory leak as
described in bug #533456.
2009-02-18 Sven Neumann <sven@gimp.org>
Merged from trunk:

View File

@@ -41,10 +41,6 @@
#include <directfb_version.h>
#if DIRECTFB_MAJOR_VERSION < 1
#define u32 __u32
#define u8 __u8
#endif
static struct {
const guchar *bits;

View File

@@ -80,10 +80,8 @@ GdkVisual * gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format
IDirectFBWindow *gdk_directfb_window_lookup(GdkWindow *window);
IDirectFBSurface *gdk_directfb_surface_lookup(GdkWindow *window);
#if (DIRECTFB_MAJOR_VERSION >= 1)
GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
IDirectFBSurface *subsurface);
#endif
IDirectFBSurface *subsurface);
G_END_DECLS

View File

@@ -419,7 +419,6 @@ 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)
{
@@ -436,7 +435,6 @@ gdk_directfb_event_windows_remove (GdkWindow *window)
impl->window->DetachEventBuffer (impl->window, EventBuffer);
/* FIXME: should we warn if (! EventBuffer) ? */
}
#endif
GdkWindow *
gdk_directfb_child_at (GdkWindow *window,

View File

@@ -239,10 +239,8 @@ GdkImage* _gdk_directfb_copy_to_image (GdkDrawable *drawable,
gint width,
gint height);
void gdk_directfb_event_windows_add (GdkWindow *window);
#if (DIRECTFB_MAJOR_VERSION >= 1)
void gdk_directfb_event_windows_add (GdkWindow *window);
void gdk_directfb_event_windows_remove (GdkWindow *window);
#endif
GdkGrabStatus gdk_directfb_keyboard_grab (GdkDisplay *display,
GdkWindow *window,

View File

@@ -697,9 +697,8 @@ _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)
@@ -2640,9 +2639,8 @@ gdk_window_get_frame_extents (GdkWindow *window,
* Given a directfb window and a subsurface of that window
* create a gdkwindow child wrapper
*/
#if (DIRECTFB_MAJOR_VERSION >= 1)
GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
IDirectFBSurface *subsurface)
IDirectFBSurface *subsurface)
{
GdkWindow *window;
GdkWindowObject *private;
@@ -2686,7 +2684,6 @@ GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
return window;
}
#endif
/*
* The wrapping is not perfect since directfb does not give full access