summaryrefslogtreecommitdiff
path: root/render/render.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-06-21 17:13:45 +0000
committerDana Jansens <danakj@orodu.net>2003-06-21 17:13:45 +0000
commit0a8fa636cd659b87af1b6dc8720c91d4f02de73d (patch)
tree9420a5de08271225f9ab785573daa86c53e91ee7 /render/render.c
parentbab8b41f5cdf24bc14d99030f69e6b08d293e583 (diff)
always create the bg pixmap, X seems to not like it if i dont?
Diffstat (limited to 'render/render.c')
-rw-r--r--render/render.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/render/render.c b/render/render.c
index 8ed3c868..1d5b705c 100644
--- a/render/render.c
+++ b/render/render.c
@@ -30,13 +30,10 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
resized = (l->w != w || l->h != h);
- if (resized) {
- oldp = l->pixmap; /* save to free after changing the visible pixmap */
- l->pixmap = XCreatePixmap(RrDisplay(l->inst),
- RrRootWindow(l->inst),
- w, h, RrDepth(l->inst));
- } else
- oldp = None;
+ oldp = l->pixmap; /* save to free after changing the visible pixmap */
+ l->pixmap = XCreatePixmap(RrDisplay(l->inst),
+ RrRootWindow(l->inst),
+ w, h, RrDepth(l->inst));
g_assert(l->pixmap != None);
l->w = w;
@@ -56,8 +53,8 @@ void RrPaint(RrAppearance *l, Window win, gint w, gint h)
g_assert (l->surface.parent->w);
sw = l->surface.parent->w;
- source = (l->surface.parent->surface.RrPixel_data + l->surface.parentx +
- sw * l->surface.parenty);
+ source = (l->surface.parent->surface.RrPixel_data +
+ l->surface.parentx + sw * l->surface.parenty);
dest = l->surface.RrPixel_data;
for (i = 0; i < h; i++, source += sw, dest += w) {
memcpy(dest, source, w * sizeof(RrPixel32));