]> Dogcows Code - chaz/openbox/blobdiff - src/Workspace.cc
modified focus() to accept a no-raise parameter
[chaz/openbox] / src / Workspace.cc
index 1cb40b390b61620ba124a5c6caae99c64e630052..715d012e6b50c48da83749895205e9673ac931ab 100644 (file)
@@ -85,11 +85,18 @@ void Workspace::addWindow(BlackboxWindow *w, bool place, bool sticky) {
 
   stackingList.push_front(w);
 
-  if (w->isNormal()) {
+  if (! sticky)
+    w->setWorkspace(id);
+  
+  if (! w->isNormal()) {
     if (! sticky) {
-      w->setWorkspace(id);
-      w->setWindowNumber(windowList.size());
+      // just give it some number, else bad things happen as it is assumed to
+      // not be on a workspace
+      w->setWindowNumber(0);
     }
+  } else {
+    if (! sticky)
+      w->setWindowNumber(windowList.size());
 
     windowList.push_back(w);
 
@@ -110,11 +117,6 @@ void Workspace::addWindow(BlackboxWindow *w, bool place, bool sticky) {
         lastfocus = w;
       }
     }
-  } else {
-    w->setWorkspace(id);
-    // just give it some number, else bad things happen as it is assumed to not
-    // be on a workspace
-    w->setWindowNumber(0);
   }
 
   if (! w->isDesktop())
This page took 0.020642 seconds and 4 git commands to generate.