]> Dogcows Code - chaz/openbox/blobdiff - src/Window.cc
including wrong
[chaz/openbox] / src / Window.cc
index 226ac023f4f51dbca598e63b30ab7b03f9026e07..722409f97ca7d0d1ea0fc183cc6638b53929c782 100644 (file)
@@ -361,9 +361,18 @@ BlackboxWindow::~BlackboxWindow(void) {
     if (client.transient_for != (BlackboxWindow *) ~0ul) {
       client.transient_for->client.transientList.remove(this);
     }
-    client.transient_for = (BlackboxWindow*) 0;
+    // we save our transient_for though because the workspace will use it
+    // when determining the next window to get focus
   }
 
+  if (blackbox_attrib.workspace != BSENTINEL &&
+      window_number != BSENTINEL)
+    screen->getWorkspace(blackbox_attrib.workspace)->removeWindow(this);
+  else if (flags.iconic)
+    screen->removeIcon(this);
+
+  client.transient_for = (BlackboxWindow*) 0;
+
   if (client.transientList.size() > 0) {
     // reset transient_for for all transients
     BlackboxWindowList::iterator it, end = client.transientList.end();
@@ -1810,7 +1819,7 @@ void BlackboxWindow::maximize(unsigned int button) {
 
     frame.changing = *it;
   } else
-#endif
+#endif // XINERAMA
   frame.changing = screen->availableArea();
 
   switch(button) {
@@ -3044,17 +3053,25 @@ void BlackboxWindow::doMove(int x_root, int y_root) {
 
     // snap to the strut (and screen boundaries for xinerama)
 #ifdef    XINERAMA
-    if (screen->isXineramaActive() && blackbox->doXineramaSnapping())
+    if (screen->isXineramaActive() && blackbox->doXineramaSnapping()) {
+      if (! screen->doFullMax())
+        snaplist.insert(snaplist.begin(),
+                        screen->allAvailableAreas().begin(),
+                        screen->allAvailableAreas().end());
+
+      // always snap to the screen edges
       snaplist.insert(snaplist.begin(),
-                      screen->allAvailableAreas().begin(),
-                      screen->allAvailableAreas().end());
-    else
+                      screen->getXineramaAreas().begin(),
+                      screen->getXineramaAreas().end());
+    else
 #endif // XINERAMA
+    {
       if (! screen->doFullMax())
         snaplist.push_back(screen->availableArea());
-    
-    // always snap to the screen edges
-    snaplist.push_back(screen->getRect());
+
+      // always snap to the screen edges
+      snaplist.push_back(screen->getRect());
+    }
 
     RectList::const_iterator it, end = snaplist.end();
     for (it = snaplist.begin(); it != end; ++it) {
This page took 0.02579 seconds and 4 git commands to generate.