summaryrefslogtreecommitdiff
path: root/otk
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-18 02:34:54 +0000
committerDana Jansens <danakj@orodu.net>2003-01-18 02:34:54 +0000
commit056c5b435d6f52d0ade3beece3e112c4c4cc5268 (patch)
treebeea311046003a82c8c13a1e25208551d0682331 /otk
parent5b52a8f5610d3cc0a39ecb6b341e69596d892099 (diff)
set the background pixmap
Diffstat (limited to 'otk')
-rw-r--r--otk/rendercontrol.hh2
-rw-r--r--otk/truerendercontrol.cc10
-rw-r--r--otk/truerendercontrol.hh2
3 files changed, 6 insertions, 8 deletions
diff --git a/otk/rendercontrol.hh b/otk/rendercontrol.hh
index d3926745..e8dcca44 100644
--- a/otk/rendercontrol.hh
+++ b/otk/rendercontrol.hh
@@ -67,7 +67,7 @@ public:
static RenderControl *getRenderControl(int screen);
- virtual void render(::Drawable d) = 0;
+ virtual void render(::Window w) = 0;
};
}
diff --git a/otk/truerendercontrol.cc b/otk/truerendercontrol.cc
index 95b629b1..0cfa293e 100644
--- a/otk/truerendercontrol.cc
+++ b/otk/truerendercontrol.cc
@@ -108,8 +108,6 @@ void renderPixel(XImage *im, unsigned char *dp, unsigned long pixel)
{
unsigned int bpp = im->bits_per_pixel + (im->byte_order == MSBFirst) ? 1 : 0;
- printf("%lx \n", pixel);
-
switch (bpp) {
case 8: // 8bpp
*dp++ = pixel;
@@ -147,13 +145,13 @@ void renderPixel(XImage *im, unsigned char *dp, unsigned long pixel)
}
}
-void TrueRenderControl::render(::Drawable d)
+void TrueRenderControl::render(::Window win)
{
XGCValues gcv;
gcv.cap_style = CapProjecting;
int w = 255, h = 32;
- Pixmap p = XCreatePixmap(**display, d, w, h, _screen->depth());
+ Pixmap p = XCreatePixmap(**display, win, w, h, _screen->depth());
XImage *im = XCreateImage(**display, _screen->visual(), _screen->depth(),
ZPixmap, 0, NULL, w, h, 32, 0);
//GC gc = XCreateGC(**display, _screen->rootWindow(), GCCapStyle, &gcv);
@@ -187,8 +185,8 @@ void TrueRenderControl::render(::Drawable d)
//image->data = NULL;
XDestroyImage(im);
- XCopyArea(**display, p, d, DefaultGC(**display, _screen->screen()),
- 0, 0, w, h, 0, 0);
+ XSetWindowBackgroundPixmap(**display, win, p);
+ XClearWindow(**display, win);
XFreePixmap(**display, p);
}
diff --git a/otk/truerendercontrol.hh b/otk/truerendercontrol.hh
index 9647a2a3..f4057355 100644
--- a/otk/truerendercontrol.hh
+++ b/otk/truerendercontrol.hh
@@ -17,7 +17,7 @@ public:
TrueRenderControl(const ScreenInfo *screen);
virtual ~TrueRenderControl();
- virtual void render(::Drawable d);
+ virtual void render(::Window w);
};
}