]> Pileus Git - ~andy/gtk/commitdiff
looks like being called with negative width and height should be
authorSven Neumann <sven@gimp.org>
Thu, 19 Feb 2009 22:31:04 +0000 (22:31 +0000)
committerSven Neumann <neo@src.gnome.org>
Thu, 19 Feb 2009 22:31:04 +0000 (22:31 +0000)
2009-02-19  Sven Neumann  <sven@gimp.org>

* gdk/directfb/gdkwindow-directfb.c
(gdk_directfb_window_move_resize): looks like being called with
negative width and height should be interpreted as a move. Fixes
scrolling and makes popups work to some extent.

(_gdk_directfb_move_resize_child): formatting.

svn path=/trunk/; revision=22384

ChangeLog
gdk/directfb/gdkwindow-directfb.c

index b194f0b542ee1172dd307d85423e9f1a197fb0ea..7e2df8dc91a446b1de4c8c66bfdc358ac0cf682c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-02-19  Sven Neumann  <sven@gimp.org>
+
+       * gdk/directfb/gdkwindow-directfb.c
+       (gdk_directfb_window_move_resize): looks like being called with
+       negative width and height should be interpreted as a move. Fixes
+       scrolling and makes popups work to some extent.
+
+       (_gdk_directfb_move_resize_child): formatting.
+
 2009-02-19  Sven Neumann  <sven@gimp.org>
 
        * gdk/directfb/gdkdisplay-directfb.c (gdk_display_open): move the
index 0fb6c94cf3773c3a88c5190e8f754d1b15f733b2..3ca4caa70ad17f29d10d55179345fe333a08cab5 100644 (file)
@@ -1334,15 +1334,17 @@ _gdk_directfb_move_resize_child (GdkWindow *window,
 
   if (!private->input_only)
     {
-    if (impl->drawable.surface) {
-      GdkDrawableImplDirectFB *dimpl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
-      if(dimpl->cairo_surface) {
-        cairo_surface_destroy(dimpl->cairo_surface);
-        dimpl->cairo_surface= NULL;
-      }
-    impl->drawable.surface->Release (impl->drawable.surface);
-    impl->drawable.surface = NULL;
-  }
+      if (impl->drawable.surface)
+        {
+          if (impl->drawable.cairo_surface)
+            {
+              cairo_surface_destroy (impl->drawable.cairo_surface);
+              impl->drawable.cairo_surface = NULL;
+            }
+
+          impl->drawable.surface->Release (impl->drawable.surface);
+          impl->drawable.surface = NULL;
+        }
 
       parent_impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (private->parent)->impl);
 
@@ -1359,7 +1361,8 @@ _gdk_directfb_move_resize_child (GdkWindow *window,
   for (list = private->children; list; list = list->next)
     {
       private = GDK_WINDOW_OBJECT (list->data);
-         impl  = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
+      impl  = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
+
       _gdk_directfb_move_resize_child (list->data,
                                        private->x, private->y,
                                        impl->drawable.width, impl->drawable.height);
@@ -1427,8 +1430,14 @@ gdk_directfb_window_move_resize (GdkWindow *window,
   private = GDK_WINDOW_OBJECT (window);
   impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
 
+  if (with_move && (width < 0 && height < 0))
+    {
+      gdk_directfb_window_move (window, x, y);
+      return;
+    }
+
   if (width < 1)
-     width = 1;
+    width = 1;
   if (height < 1)
     height = 1;
 
@@ -1467,7 +1476,8 @@ gdk_directfb_window_move_resize (GdkWindow *window,
     }
   else
     {
-      GdkRectangle old = { private->x, private->y, impl->drawable.width, impl->drawable.height };
+      GdkRectangle old = { private->x, private->y,
+                           impl->drawable.width, impl->drawable.height };
       GdkRectangle new = { x, y, width, height };
 
       if (! with_move)