Ok, new patch, a little bug in my logic... need to add the corner to the repaint
region not (supposobly) remove it!

Hallvar Helleseth
Index: src/core/windows.c
===================================================================
RCS file: /cvs/directfb/DirectFB/src/core/windows.c,v
retrieving revision 1.46
diff -c -u -r1.46 windows.c
--- src/core/windows.c  4 Feb 2002 11:45:24 -0000       1.46
+++ src/core/windows.c  12 Feb 2002 21:17:45 -0000
@@ -526,6 +526,7 @@
      CoreWindowStack *stack = window->stack;
      int ow = window->width;
      int oh = window->height;
+     int done_width = 0;
 
      dfb_surface_reformat( window->surface, width, height,
                            window->surface->format );
@@ -533,12 +534,26 @@
      window->width = window->surface->width;
      window->height = window->surface->height;
 
-     if (window->opacity) {
-          DFBRegion region = { window->x, window->y,
-                               window->x + MAX(ow, width) - 1,
-                               window->y + MAX(oh, height) - 1 };
+     if(window->opacity) {
+          if (ow > window->width) {
+               DFBRegion region = { window->x + window->width, window->y,
+                                    window->x + ow,
+                                    window->y + window->height };
+                                                               
+               repaint_stack( stack, &region );
+               done_width = 1;
+          }
 
-          repaint_stack( stack, &region );
+          if (oh > window->height) {
+               DFBRegion region = { window->x, window->y + window->height,
+                                    window->x + window->width,
+                                    window->y + oh };
+
+               if (done_width) // repaint the corner as well
+                    region.x2 = window->x + ow;
+               
+               repaint_stack( stack, &region );
+          }
      }
 
      if (!(window->caps & DWHC_GHOST)) {

Reply via email to