]> Dogcows Code - chaz/openbox/blobdiff - util/epist/screen.cc
Fixed a boob mistake which was causing KeyRelease events to not be handled properly...
[chaz/openbox] / util / epist / screen.cc
index de5c29c277d34b4a58d7c72ea51e16cf51710fca..7773704dc8813103b0f4e093ae5e6ca98b33c0d1 100644 (file)
@@ -64,7 +64,7 @@ screen::screen(epist *epist, int number)
   _info = _epist->getScreenInfo(_number);
   _root = _info->getRootWindow();
 
-  _config->getBoolValue(Config::stackedCycling, _stacked_cycling);
+  _config->getValue(Config::stackedCycling, _stacked_cycling);
 
   // find a window manager supporting NETWM, waiting for it to load if we must
   int count = 20;  // try for 20 seconds
@@ -369,11 +369,7 @@ void screen::handleKeypress(const XEvent &e) {
 }
 
 
-void screen::handleKeyrelease(const XEvent &e) {
-  // we're not interested in non-modifiers
-  if (!isModifier(e.xkey.keycode))
-    return;
-
+void screen::handleKeyrelease(const XEvent &) {
   // the only keyrelease event we care about (for now) is when we do stacked
   // cycling and the modifier is released
   if (_stacked_cycling && _cycling && nothingIsPressed()) {
@@ -672,7 +668,7 @@ void screen::changeWorkspaceVert(const int num) const {
   int active_desktop = (signed)_active_desktop;
   int wnum = 0;
 
-  _config->getNumberValue(Config::workspaceColumns, width);
+  _config->getValue(Config::workspaceColumns, width);
 
   if (width > num_desktops || width <= 0)
     return;
@@ -704,7 +700,7 @@ void screen::changeWorkspaceHorz(const int num) const {
   int active_desktop = (signed)_active_desktop;
   int wnum = 0;
 
-  _config->getNumberValue(Config::workspaceColumns, width);
+  _config->getValue(Config::workspaceColumns, width);
 
   if (width > num_desktops || width <= 0)
     return;
@@ -798,21 +794,6 @@ void screen::ungrabModifiers() const {
 }
 
 
-bool screen::isModifier(const KeyCode kc) const {
-  KeySym ks = XKeycodeToKeysym(_epist->getXDisplay(), kc, 0);
-
-  if (ks == XK_Shift_L || ks == XK_Shift_R ||
-      ks == XK_Control_L || ks == XK_Control_R ||
-      ks == XK_Meta_L || ks == XK_Meta_R ||
-      ks == XK_Alt_L || ks == XK_Alt_R ||
-      ks == XK_Super_L || ks == XK_Super_R ||
-      ks == XK_Hyper_L || ks == XK_Hyper_R)
-    return true;
-  else
-    return false;
-}
-
-
 bool screen::nothingIsPressed(void) const
 {
   char keys[32];
This page took 0.022222 seconds and 4 git commands to generate.