]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
Take menu file from rc file if it isn't specified on the command line.
[chaz/openbox] / src / Window.cc
index 8a1bbda2f3314575647abb0dfde55c1a6644abbe..680943e214d5eb3c3e8453b8043f4573ad086064 100644 (file)
@@ -600,21 +600,17 @@ void BlackboxWindow::decorate(void) {
   if (needsPressed) {
     texture = &(screen->getWindowStyle()->b_pressed);
     
-    Pixmap pbutton = texture->render(frame.button_w, frame.button_w,
-                                     pbutton);
-    unsigned long pixel;
-    
-    if (!pbutton) {
-      pixel = texture->color().pixel();
-      if (needsPressed & 0x1)
-        frame.pfbutton_pixel = pixel;
-      if (needsPressed & 0x2)
-        frame.pubutton_pixel = pixel;
-    } else {
-      if (needsPressed & 0x1)
-        frame.pfbutton = pbutton;
-      if (needsPressed & 0x2)
-        frame.pubutton = pbutton;
+    if (needsPressed & 0x1) {
+      frame.pfbutton = texture->render(frame.button_w, frame.button_w,
+                                       frame.pfbutton);
+      if (! frame.pfbutton)
+        frame.pfbutton_pixel = texture->color().pixel();
+    }
+    if (needsPressed & 0x2) {
+      frame.pubutton = texture->render(frame.button_w, frame.button_w,
+                                       frame.pubutton);
+      if (! frame.pubutton)
+        frame.pubutton = texture->color().pixel();
     }
     
   }
@@ -4229,8 +4225,6 @@ void BlackboxWindow::constrain(Corner anchor,
     if (dh > client.max_height) dh = client.max_height;
   }
 
-  assert(dw >= base_width && dh >= base_height);
-
   if (client.width_inc > 1) {
     dw -= base_width;
     dw /= client.width_inc;
This page took 0.023971 seconds and 4 git commands to generate.