]> Dogcows Code - chaz/openbox/blobdiff - src/Screen.cc
some memory bugs from woodblock (thanks!)
[chaz/openbox] / src / Screen.cc
index 4716d23a3532e56991d34a30a0f063b7d1ac0846..dac5d6f8938421579ec4b3b2bb86761f66257a3d 100644 (file)
@@ -1217,8 +1217,8 @@ void BScreen::manageWindow(Window w) {
     // desktop windows cant do anything, so we remove all the normal window
     // stuff from them, they are only kept around so that we can keep them on
     // the bottom of the z-order
-    addDesktopWindow(win->getClientWindow());
     win->restore(True);
+    addDesktopWindow(win->getClientWindow());
     delete win;
     return;
   }
@@ -1303,6 +1303,7 @@ void BScreen::updateWorkArea(void) {
     }
     xatom->setValue(getRootWindow(), XAtom::net_workarea, XAtom::cardinal,
                     dims, 4 * workspacesList.size());
+    delete [] dims;
   } else
     xatom->setValue(getRootWindow(), XAtom::net_workarea, XAtom::cardinal,
                     0, 0);
@@ -2170,9 +2171,10 @@ void BScreen::toggleFocusModel(FocusModel model) {
   if (model == SloppyFocus) {
     saveSloppyFocus(True);
   } else {
+    // we're cheating here to save writing the config file 3 times
+    resource.auto_raise = False;
+    resource.click_raise = False;
     saveSloppyFocus(False);
-    saveAutoRaise(False);
-    saveClickRaise(False);
   }
 
   updateFocusModel();
This page took 0.021883 seconds and 4 git commands to generate.