gtk+ r22369 - in branches/gtk-2-14: . gdk/directfb



Author: neo
Date: Wed Feb 18 20:46:02 2009
New Revision: 22369
URL: http://svn.gnome.org/viewvc/gtk+?rev=22369&view=rev

Log:
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.



Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gdk/directfb/gdkcursor-directfb.c
   branches/gtk-2-14/gdk/directfb/gdkdirectfb.h
   branches/gtk-2-14/gdk/directfb/gdkevents-directfb.c
   branches/gtk-2-14/gdk/directfb/gdkprivate-directfb.h
   branches/gtk-2-14/gdk/directfb/gdkwindow-directfb.c

Modified: branches/gtk-2-14/gdk/directfb/gdkcursor-directfb.c
==============================================================================
--- branches/gtk-2-14/gdk/directfb/gdkcursor-directfb.c	(original)
+++ branches/gtk-2-14/gdk/directfb/gdkcursor-directfb.c	Wed Feb 18 20:46:02 2009
@@ -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;

Modified: branches/gtk-2-14/gdk/directfb/gdkdirectfb.h
==============================================================================
--- branches/gtk-2-14/gdk/directfb/gdkdirectfb.h	(original)
+++ branches/gtk-2-14/gdk/directfb/gdkdirectfb.h	Wed Feb 18 20:46:02 2009
@@ -80,10 +80,8 @@
 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

Modified: branches/gtk-2-14/gdk/directfb/gdkevents-directfb.c
==============================================================================
--- branches/gtk-2-14/gdk/directfb/gdkevents-directfb.c	(original)
+++ branches/gtk-2-14/gdk/directfb/gdkevents-directfb.c	Wed Feb 18 20:46:02 2009
@@ -419,7 +419,6 @@
     impl->window->CreateEventBuffer (impl->window, &EventBuffer);
 }
 
-#if (DIRECTFB_MAJOR_VERSION >= 1)
 void
 gdk_directfb_event_windows_remove (GdkWindow *window)
 {
@@ -436,7 +435,6 @@
     impl->window->DetachEventBuffer (impl->window, EventBuffer);
 /* FIXME: should we warn if (! EventBuffer) ? */
 }
-#endif
 
 GdkWindow *
 gdk_directfb_child_at (GdkWindow *window,

Modified: branches/gtk-2-14/gdk/directfb/gdkprivate-directfb.h
==============================================================================
--- branches/gtk-2-14/gdk/directfb/gdkprivate-directfb.h	(original)
+++ branches/gtk-2-14/gdk/directfb/gdkprivate-directfb.h	Wed Feb 18 20:46:02 2009
@@ -239,10 +239,8 @@
                                        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,

Modified: branches/gtk-2-14/gdk/directfb/gdkwindow-directfb.c
==============================================================================
--- branches/gtk-2-14/gdk/directfb/gdkwindow-directfb.c	(original)
+++ branches/gtk-2-14/gdk/directfb/gdkwindow-directfb.c	Wed Feb 18 20:46:02 2009
@@ -697,9 +697,8 @@
   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 @@
  * 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 @@
   return window;
 
 }
-#endif
 
 /*
  * The wrapping is not perfect since directfb does not give full access



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]