]> Dogcows Code - chaz/openbox/commitdiff
starts.. then exits.
authorDana Jansens <danakj@orodu.net>
Thu, 23 Jan 2003 01:21:39 +0000 (01:21 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 23 Jan 2003 01:21:39 +0000 (01:21 +0000)
otk/renderstyle.cc

index 8361ce4ddeb1ad0279056a7601f23690e82e8c3c..c1d5685ed54809bd0fc37ccfd4ab6d2160da4bbe 100644 (file)
@@ -169,81 +169,45 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile)
 
   _label_font = new Font(_screen, "Arial,Sans-9:bold", true, 1, 0x40);
 
-  XImage *image = XCreateImage(**display,
-                               display->screenInfo(_screen)->visual(),
-                               2, XYBitmap, 0, NULL, 8, 8, 0, 0);
-  assert(image);
-  
   _max_mask = new PixmapMask();
   _max_mask->w = _max_mask->h = 8;
   {
-    unsigned char data[] = {
-      0,1,1,1,1,1,1,0,
-      1,1,1,1,1,1,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,1,1,1,1,1,1,
-      0,1,1,1,1,1,1,0 };
-    image->data = (char*)data;
-    XPutImage(**display, _max_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    char data[] = { 0x7e, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e };
+    _max_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
 
   _icon_mask = new PixmapMask();
   _icon_mask->w = _icon_mask->h = 8;
   {
-    unsigned char data[] = {
-      0,0,0,0,0,0,0,0,
-      0,0,0,0,0,0,0,0,
-      1,1,0,0,0,0,1,1,
-      1,1,1,0,0,1,1,1,
-      0,1,1,1,1,1,1,0,
-      0,0,1,1,1,1,0,0,
-      0,0,0,1,1,0,0,0,
-      0,0,0,0,0,0,0,0 };
-    image->data = (char*)data;
-    XPutImage(**display, _icon_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    char data[] = { 0x00, 0x00, 0xc3, 0xe7, 0x7e, 0x3c, 0x18, 0x00 };
+    _icon_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
   
   _stick_mask = new PixmapMask();
   _stick_mask->w = _stick_mask->h = 8;
   {
-    unsigned char data[] = {
-      0,0,0,0,0,0,0,0,
-      0,0,0,0,0,0,0,0,
-      0,0,0,1,1,0,0,0,
-      0,0,1,1,1,1,0,0,
-      0,0,1,1,1,1,0,0,
-      0,0,0,1,1,0,0,0,
-      0,0,0,0,0,0,0,0,
-      0,0,0,0,0,0,0,0 };    
-    image->data = (char*)data;
-    XPutImage(**display, _stick_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    char data[] = { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 };
+    _icon_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
   
   _close_mask = new PixmapMask();
   _close_mask->w = _close_mask->h = 8;
   {
-    unsigned char data[] = {
-      1,1,0,0,0,0,1,1,
-      1,1,1,0,0,1,1,1,
-      0,1,1,1,1,1,1,0,
-      0,0,1,1,1,1,0,0,
-      0,0,1,1,1,1,0,0,
-      0,1,1,1,1,1,1,0,
-      1,1,1,0,0,1,1,1,
-      1,1,0,0,0,0,1,1 };
-    image->data = (char*)data;
-    XPutImage(**display, _close_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    char data[] = { 0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3 };
+    _icon_mask->mask=
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
-
-  image->data = NULL;
-  XDestroyImage(image);
 }
 
 RenderStyle::~RenderStyle()
This page took 0.031772 seconds and 4 git commands to generate.