- resource.wstyle.f_focus =
- readDatabaseColor("window.frame.focusColor", "white", style);
- resource.wstyle.f_unfocus =
- readDatabaseColor("window.frame.unfocusColor", "black", style);
+
+#ifdef BITMAPBUTTONS
+ if (resource.wstyle.close_button.mask != None)
+ XFreePixmap(blackbox->getXDisplay(), resource.wstyle.close_button.mask);
+ if (resource.wstyle.max_button.mask != None)
+ XFreePixmap(blackbox->getXDisplay(), resource.wstyle.max_button.mask);
+ if (resource.wstyle.icon_button.mask != None)
+ XFreePixmap(blackbox->getXDisplay(), resource.wstyle.icon_button.mask);
+ if (resource.wstyle.stick_button.mask != None)
+ XFreePixmap(blackbox->getXDisplay(), resource.wstyle.stick_button.mask);
+
+ resource.wstyle.close_button.mask = resource.wstyle.max_button.mask =
+ resource.wstyle.icon_button.mask =
+ resource.wstyle.icon_button.mask = None;
+
+ readDatabaseMask("window.button.close.mask", resource.wstyle.close_button,
+ style);
+ readDatabaseMask("window.button.max.mask", resource.wstyle.max_button,
+ style);
+ readDatabaseMask("window.button.icon.mask", resource.wstyle.icon_button,
+ style);
+ readDatabaseMask("window.button.stick.mask", resource.wstyle.stick_button,
+ style);
+#endif // BITMAPBUTTONS
+
+ // we create the window.frame texture by hand because it exists only to
+ // make the code cleaner and is not actually used for display
+ BColor color = readDatabaseColor("window.frame.focusColor", "white", style);
+ resource.wstyle.f_focus = BTexture("solid flat", getBaseDisplay(),
+ getScreenNumber(), image_control);
+ resource.wstyle.f_focus.setColor(color);
+
+ color = readDatabaseColor("window.frame.unfocusColor", "white", style);
+ resource.wstyle.f_unfocus = BTexture("solid flat", getBaseDisplay(),
+ getScreenNumber(), image_control);
+ resource.wstyle.f_unfocus.setColor(color);
+