]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
line up the vars
[chaz/openbox] / util / epist / screen.cc
index 0d7f90d3d46907a0104e93f0c0f2da17d9a8d783..475a96e20f95581b766e4aec3f44ece9e3580ccf 100644 (file)
@@ -151,22 +151,27 @@ void screen::handleKeypress(const XEvent &e) {
       switch (it->type()) {
       case Action::nextWorkspace:
         cycleWorkspace(true);
-        break;
+        return;
 
       case Action::prevWorkspace:
         cycleWorkspace(false);
-        break;
+        return;
 
       case Action::changeWorkspace:
         changeWorkspace(it->number());
-        break;
-
-      case Action::shade:
-        (*_active)->shade(! (*_active)->shaded());
-        break;
+        return;
       }
 
-      break;
+      // these actions require an active window
+      if (_active != _clients.end()) {
+        XWindow *window = *_active;
+
+        switch (it->type()) {
+        case Action::shade:
+          window->shade(! window->shaded());
+          return;
+        }
+      }
     }
   }
 }
This page took 0.027072 seconds and 4 git commands to generate.