summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Neumann <sven@gimp.org>2009-02-18 20:46:02 +0000
committerSven Neumann <neo@src.gnome.org>2009-02-18 20:46:02 +0000
commitd722067aa3808446ebcbe5ea6cba10c218a6851a (patch)
treee5199aeacee42e69bc43700505894d89c94b1527
parentfbcd10e70dc357bbd23f664827254d18fee1cc66 (diff)
downloadgtk+-d722067aa3808446ebcbe5ea6cba10c218a6851a.tar.gz
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
-rw-r--r--ChangeLog15
-rw-r--r--gdk/directfb/gdkcursor-directfb.c4
-rw-r--r--gdk/directfb/gdkdirectfb.h4
-rw-r--r--gdk/directfb/gdkevents-directfb.c2
-rw-r--r--gdk/directfb/gdkprivate-directfb.h4
-rw-r--r--gdk/directfb/gdkwindow-directfb.c7
6 files changed, 19 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 67d8dc8025..b1cc3d60e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,21 @@
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:
+
Bug 513422 – Unknown meaning of translatable messages
* gdk/directfb/gdkdisplay-directfb.c: removed broken and commented
diff --git a/gdk/directfb/gdkcursor-directfb.c b/gdk/directfb/gdkcursor-directfb.c
index f753cfa8cc..57433a43fb 100644
--- a/gdk/directfb/gdkcursor-directfb.c
+++ b/gdk/directfb/gdkcursor-directfb.c
@@ -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;
diff --git a/gdk/directfb/gdkdirectfb.h b/gdk/directfb/gdkdirectfb.h
index 9fb0d5ddfc..6febb72e9a 100644
--- a/gdk/directfb/gdkdirectfb.h
+++ b/gdk/directfb/gdkdirectfb.h
@@ -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
diff --git a/gdk/directfb/gdkevents-directfb.c b/gdk/directfb/gdkevents-directfb.c
index a462d724d9..d04a6c5759 100644
--- a/gdk/directfb/gdkevents-directfb.c
+++ b/gdk/directfb/gdkevents-directfb.c
@@ -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,
diff --git a/gdk/directfb/gdkprivate-directfb.h b/gdk/directfb/gdkprivate-directfb.h
index c53c351d59..ad7e7f5970 100644
--- a/gdk/directfb/gdkprivate-directfb.h
+++ b/gdk/directfb/gdkprivate-directfb.h
@@ -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,
diff --git a/gdk/directfb/gdkwindow-directfb.c b/gdk/directfb/gdkwindow-directfb.c
index c8c9f6017a..0acfb42f55 100644
--- a/gdk/directfb/gdkwindow-directfb.c
+++ b/gdk/directfb/gdkwindow-directfb.c
@@ -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