]> Dogcows Code - chaz/openbox/blobdiff - otk/style.cc
support the button pressed resources better
[chaz/openbox] / otk / style.cc
index 5aeef434a249532cc35ef213d08a44d034189249..fcc0ff2e8b6ac326f3d5092a5d2c069726e50c19 100644 (file)
@@ -66,13 +66,21 @@ void Style::load(const Configuration &style) {
 
   b_focus = readDatabaseTexture("window.button.focus", "white", style);
   b_unfocus = readDatabaseTexture("window.button.unfocus", "black", style);
-  b_pressed = readDatabaseTexture("window.button.pressed", "black", style);
 
   //if neither of these can be found, we will use the previous resource
   b_pressed_focus = readDatabaseTexture("window.button.pressed.focus",
                                         "black", style, true);
+  if (b_pressed_focus.texture() == BTexture::NoTexture) {
+    b_pressed_focus = readDatabaseTexture("window.button.pressed", "black",
+                                          style);
+  }
+    
   b_pressed_unfocus = readDatabaseTexture("window.button.pressed.unfocus",
                                           "black", style, true);
+  if (b_pressed_unfocus.texture() == BTexture::NoTexture) {
+    b_pressed_unfocus = readDatabaseTexture("window.button.pressed", "black",
+                                            style);
+  }
 
   if (close_button.mask != None)
     XFreePixmap(OBDisplay::display, close_button.mask);
This page took 0.022025 seconds and 4 git commands to generate.