X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=680943e214d5eb3c3e8453b8043f4573ad086064;hb=9af642d29918e8b36d7f1fd17e4c771662d4fe97;hp=b8e2214a52751d7e7ca9e72a09be1920bc312a25;hpb=987cf7cc40d4ab9c5e895ea2b0c7a77f10a0510f;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index b8e2214a..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(); } } @@ -3368,7 +3364,7 @@ void BlackboxWindow::doWorkspaceWarping(int x_root, int y_root, int &dx) { bool focus = flags.focused; // had focus while moving? int dest_x = x_root; - if (x_root < 0) { + if (x_root <= 0) { dest_x += screen->getRect().width() - 1; dx += screen->getRect().width() - 1; } else { @@ -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;