]> Dogcows Code - chaz/openbox/blobdiff - render/render.c
measure the font's height instead of listening to Xft
[chaz/openbox] / render / render.c
index fdbab06f340fe9c11b1c2aacecdfb6b1f9bd6991..481ef098c2059800a2ecdce44d374ff8f173ebce 100644 (file)
@@ -66,7 +66,7 @@ void x_paint(Window win, Appearance *l, int x, int y, int w, int h)
 //    printf("painting window %ld\n", win);
 
     oldp = l->pixmap; /* save to free after changing the visible pixmap */
-    l->pixmap = XCreatePixmap(ob_display, ob_root, w, h, render_depth);
+    l->pixmap = XCreatePixmap(ob_display, ob_root, x+w, y+h, render_depth);
     g_assert(l->pixmap != None);
 
     if (l->xftdraw != NULL)
@@ -80,7 +80,7 @@ void x_paint(Window win, Appearance *l, int x, int y, int w, int h)
     l->surface.data.planar.pixel_data = g_new(pixel32, w * h);
 
     if (l->surface.data.planar.grad == Background_Solid)
-        gradient_solid(l, w, h);
+        gradient_solid(l, x, y, w, h);
     else gradient_render(&l->surface, w, h);
 
 /*reduce depth here...
@@ -94,7 +94,7 @@ void x_paint(Window win, Appearance *l, int x, int y, int w, int h)
         im->byte_order = endian;
         im->data = l->surface.data.planar.pixel_data;
         XPutImage(ob_display, l->pixmap, DefaultGC(ob_display, ob_screen),
-                  im, 0, 0, 0, 0, w, h);
+                  im, 0, 0, x, y, w, h);
         im->data = NULL;
         XDestroyImage(im);
     }
This page took 0.022112 seconds and 4 git commands to generate.