From: Dana Jansens Date: Thu, 23 Jan 2003 01:21:39 +0000 (+0000) Subject: starts.. then exits. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=46441f7d60c008b11a170516734ae7a5932a738e;p=chaz%2Fopenbox starts.. then exits. --- diff --git a/otk/renderstyle.cc b/otk/renderstyle.cc index 8361ce4d..c1d5685e 100644 --- a/otk/renderstyle.cc +++ b/otk/renderstyle.cc @@ -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()