]> Dogcows Code - chaz/openbox/blobdiff - otk/surface.cc
use bevel width on the top/bottom too
[chaz/openbox] / otk / surface.cc
index 99fa82b04bf7e329569c7e71278378d7c2782b00..9dfb88898043faaac22541e4060c4bbb03e63649 100644 (file)
@@ -7,7 +7,7 @@
 #include "surface.hh"
 #include "display.hh"
 #include "screeninfo.hh"
-#include "gccache.hh"
+#include "rendercolor.hh"
 
 extern "C" {
 #include <X11/Xutil.h>
@@ -28,19 +28,17 @@ Surface::~Surface()
   destroyObjects();
 }
 
-void Surface::setPixmap(const Color &color)
+void Surface::setPixmap(const RenderColor &color)
 {
   if (_pixmap == None)
     createObjects();
 
-  Pen p(color);
-  XFillRectangle(**display, _pixmap, p.gc(), 0, 0,
+  XFillRectangle(**display, _pixmap, color.gc(), 0, 0,
                  _size.x(), _size.y());
 }
 
 void Surface::setPixmap(XImage *image)
 {
-  printf("SET PIXMAP\n");
   assert(image->width == _size.x());
   assert(image->height == _size.y());
   
@@ -59,9 +57,11 @@ void Surface::createObjects()
   
   _pixmap = XCreatePixmap(**display, info->rootWindow(),
                           _size.x(), _size.y(), info->depth());
+  assert(_pixmap != None);
     
   _xftdraw = XftDrawCreate(**display, _pixmap,
                            info->visual(), info->colormap());
+  assert(_xftdraw);
 }
 
 void Surface::destroyObjects()
This page took 0.024659 seconds and 4 git commands to generate.