]> Dogcows Code - chaz/openbox/blobdiff - render/render.c
drop the startup notify timeout from 30 to 20 seconds
[chaz/openbox] / render / render.c
index b357f8a35f759857a0eee0cfb124d6309a068ac8..8623455f6c06091e6c55335ca48531eb393b8f5b 100644 (file)
@@ -40,9 +40,9 @@ static void pixel_data_to_pixmap(RrAppearance *l,
 
 Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
 {
-    gint i, transferred = 0, sw, sh, partial_w, partial_h;
+    gint i, transferred = 0, sw, sh, partial_w, partial_h, force_transfer = 0;
     RrPixel32 *source, *dest;
-    Pixmap oldp;
+    Pixmap oldp = None;
     RrRect tarea; /* area in which to draw textures */
     gboolean resized;
 
@@ -77,8 +77,10 @@ Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
                                RrVisual(a->inst), RrColormap(a->inst));
     g_assert(a->xftdraw != NULL);
 
-    g_free(a->surface.pixel_data);
-    a->surface.pixel_data = g_new(RrPixel32, w * h);
+    if (resized) {
+        g_free(a->surface.pixel_data);
+        a->surface.pixel_data = g_new(RrPixel32, w * h);
+    }
 
     if (a->surface.grad == RR_SURFACE_PARENTREL) {
         g_assert (a->surface.parent);
@@ -158,14 +160,18 @@ Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
                         &a->texture[i].data.rgba,
                         a->w, a->h,
                         &tarea);
+            force_transfer = 1;
         break;
         }
     }
 
     if (!transferred) {
         transferred = 1;
-        if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced))
+        if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced) ||
+            force_transfer)
+        {
             pixel_data_to_pixmap(a, 0, 0, w, h);
+        }
     }
 
     return oldp;
This page took 0.023392 seconds and 4 git commands to generate.