X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=680943e214d5eb3c3e8453b8043f4573ad086064;hb=87e63d53af67d5ea98f55a27007663d4c9c8fc6c;hp=8a1bbda2f3314575647abb0dfde55c1a6644abbe;hpb=fa3fb793e7e8a4d7dfdc1d4997983ea59a8b6924;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index 8a1bbda2..680943e2 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -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;