X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=b81f1b90b55b8d27d0d60d214f526aacf530f723;hb=bb1a97327b08fa5c1b8025083fc39498b3256c84;hp=4133ac0080b737e22f9879cc7624f2ff4d8993d9;hpb=dfc5f034581f5a26cba5c4811500438f89f0634a;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index 4133ac00..b81f1b90 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -284,7 +284,7 @@ OpenboxWindow::OpenboxWindow(Openbox *b, Window w, BScreen *s) { decorate(); - if (workspace_number < 0 || workspace_number >= screen->getCount()) + if (workspace_number < 0 || workspace_number >= screen->getWorkspaceCount()) screen->getCurrentWorkspace()->addWindow(this, place_window); else screen->getWorkspace(workspace_number)->addWindow(this, place_window); @@ -1927,7 +1927,7 @@ void OpenboxWindow::restoreAttributes(void) { } if (((int) openbox_attrib.workspace != screen->getCurrentWorkspaceID()) && - ((int) openbox_attrib.workspace < screen->getCount())) { + ((int) openbox_attrib.workspace < screen->getWorkspaceCount())) { screen->reassociateWindow(this, openbox_attrib.workspace, True); if (current_state == NormalState) current_state = WithdrawnState; @@ -2688,9 +2688,10 @@ void OpenboxWindow::buttonReleaseEvent(XButtonEvent *re) { (re->x >= 0) && ((unsigned) re->x <= frame.button_w) && (re->y >= 0) && ((unsigned) re->y <= frame.button_h)) { close(); - } else { - redrawCloseButton(False); } + //we should always redraw the close button. some applications + //eg. acroread don't honour the close. + redrawCloseButton(False); } // middle button released } else if (re->button == 2) {