]> Dogcows Code - chaz/openbox/blobdiff - src/Screen.cc
disable the current workspace in the send-to menu
[chaz/openbox] / src / Screen.cc
index 919ea9b62960979dd1da495c0df78c4483409f27..e0ea21376cfb7cb919a65d744df0f625b7440d98 100644 (file)
@@ -408,6 +408,16 @@ void BScreen::saveFocusLast(bool f) {
 }
 
 
+void BScreen::saveHideToolbar(bool h) {
+  resource.hide_toolbar = h;
+  if (resource.hide_toolbar)
+    toolbar->unmapToolbar();
+  else
+    toolbar->mapToolbar();
+  config->setValue(screenstr + "hideToolbar", resource.hide_toolbar);
+}
+
+
 void BScreen::saveWorkspaces(unsigned int w) {
   resource.workspaces = w;
   config->setValue(screenstr + "workspaces", resource.workspaces);
@@ -493,6 +503,7 @@ void BScreen::save_rc(void) {
   saveFullMax(resource.full_max);
   saveFocusNew(resource.focus_new);
   saveFocusLast(resource.focus_last);
+  saveHideToolbar(resource.hide_toolbar);
   saveWorkspaces(resource.workspaces);
   savePlacementPolicy(resource.placement_policy);
   saveEdgeSnapThreshold(resource.edge_snap_threshold);
@@ -529,6 +540,9 @@ void BScreen::load_rc(void) {
   if (! config->getValue(screenstr + "opaqueMove", resource.opaque_move))
     resource.opaque_move = false;
 
+  if (! config->getValue(screenstr + "hideToolbar", resource.hide_toolbar))
+    resource.hide_toolbar = false;
+
   if (! config->getValue(screenstr + "imageDither", b))
     b = true;
   image_control->setDither(b);
@@ -1056,6 +1070,13 @@ void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) {
 
   removeNetizen(w->getClientWindow());
 
+  /*
+    some managed windows can also be window group controllers.  when
+    unmanaging such windows, we should also delete the window group.
+  */
+  BWindowGroup *group = blackbox->searchGroup(w->getClientWindow());
+  delete group;
+
   delete w;
 }
 
This page took 0.02706 seconds and 4 git commands to generate.