]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
added symlinking. needs a little work.
[chaz/openbox] / src / Window.cc
index 4133ac0080b737e22f9879cc7624f2ff4d8993d9..b81f1b90b55b8d27d0d60d214f526aacf530f723 100644 (file)
@@ -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) {
This page took 0.022167 seconds and 4 git commands to generate.