]> Dogcows Code - chaz/openbox/blobdiff - src/Rootmenu.cc
disable things in the placement menu when they dont have any effect for the selected...
[chaz/openbox] / src / Rootmenu.cc
index 148c1fcada65de96a11f90702b70d53beee6bf77..3395b4f728da28745eed496f85995e91193608cb 100644 (file)
@@ -61,6 +61,11 @@ void Rootmenu::itemSelected(int button, unsigned int index) {
   if (! item->function())
     return;
 
+  if (! (getScreen()->getRootmenu()->isTorn() || isTorn()) &&
+      item->function() != BScreen::Reconfigure &&
+      item->function() != BScreen::SetStyle)
+    hide();
+
   switch (item->function()) {
   case BScreen::Execute:
     if (item->exec())
@@ -88,9 +93,4 @@ void Rootmenu::itemSelected(int button, unsigned int index) {
     getScreen()->getBlackbox()->reconfigure();
     return;
   }
-
-  if (! (getScreen()->getRootmenu()->isTorn() || isTorn()) &&
-      item->function() != BScreen::Reconfigure &&
-      item->function() != BScreen::SetStyle)
-    hide();
 }
This page took 0.02032 seconds and 4 git commands to generate.