]> Dogcows Code - chaz/openbox/commitdiff
added user option to modify raise behavior when stackedCycling is on
authorMarius Nita <marius@cs.pdx.edu>
Mon, 14 Oct 2002 02:50:44 +0000 (02:50 +0000)
committerMarius Nita <marius@cs.pdx.edu>
Mon, 14 Oct 2002 02:50:44 +0000 (02:50 +0000)
util/epist/config.cc
util/epist/config.hh
util/epist/epistrc.5.in
util/epist/screen.cc
util/epist/screen.hh

index cefa28cc84bd3d30a0aaee7a8efafd496131461b..461778e5f952958b8eb0ada2689f29729364a7ec 100644 (file)
@@ -97,6 +97,7 @@ void Config::addOption(const std::string &name, const std::string &value)
   }
   bool_options[] = {
     { "stackedcycling", Config::stackedCycling },
+    { "stackedcyclingraise", Config::stackedCyclingRaise },
     { "", NUM_BOOL_TYPES }
   };
 
index 2c2957470e075fa18f3470fb9b35fadbe7f45824..8749009dda7fe0908480d388bef2b412704c4615 100644 (file)
@@ -36,6 +36,7 @@ public:
   enum BoolType {
     NO_BOOL_TYPE,
     stackedCycling,
+    stackedCyclingRaise,
     NUM_BOOL_TYPES
   };
 
index a11013b87cdab0575867a9d6e6b0470a43c07aab..06615768ec7d9dc0da7320fc00725e39f3f17e7c 100644 (file)
@@ -62,18 +62,23 @@ Control-Mod1-x {
 .br
 }
 .SH OPTIONS
-.SS stackedCycling (boolean)
+.SS stackedCycling (boolean, default=off)
 When this option is set to True, any window cycling actions, such as nextWindow,
 prevWindow, nextWindowOfClass, etc., will cause the windows to focus, but they will
 not be raised until the modifiers are released. When the modifier is released,
 the focused (and now raised) window will be moved to the top of the stacking order,
 so if you execute nextWindow and release the modifiers multiple times, focus will
 cycle between two windows.
-.SS chainTimeout (number)
+.SS stackedCyclingRaise (boolean, default=off)
+This option modifies the window raise behavior when stackedCycling is turned on.
+When true, windows will be raised immediatly on focus, rather than when the
+keys are released. This may be desirable if you frequently have windows that are
+obscured by other windows.
+.SS chainTimeout (number, default=3500)
 Specifies the period of time after which a started key chain will
 be timed out. It takes a number argument specifying the number of
 milliseconds to wait. It defaults to 4000.
-.SS workspaceColumns (number)
+.SS workspaceColumns (number, default=0, disabled)
 Specifies the number of columns of your workspace layout if you are using
 your workspaces in a 2-dimensional manner. This option must exist if one of
 the prevWorkspaceColumn, prevWorkspaceRow, nextWorkspaceColumn,
index 5711d5515646beb7f1373d39bd8f5b94db24ffae..ca029652efacfd330bd1b29b08b00c84adf7c2ec 100644 (file)
@@ -66,7 +66,7 @@ using std::string;
 screen::screen(epist *epist, int number) 
   : _clients(epist->clientsList()), _active(epist->activeWindow()),
     _config(epist->getConfig()), _grabbed(true), _cycling(false),
-    _stacked_cycling(false)
+    _stacked_cycling(false), _stacked_raise(false)
 {
   _epist = epist;
   _xatom = _epist->xatom();
@@ -76,6 +76,8 @@ screen::screen(epist *epist, int number)
   _root = _info->getRootWindow();
 
   _config->getValue(Config::stackedCycling, _stacked_cycling);
+  if (_stacked_cycling)
+    _config->getValue(Config::stackedCyclingRaise, _stacked_raise);
 
   // find a window manager supporting NETWM, waiting for it to load if we must
   int count = 20;  // try for 20 seconds
@@ -656,10 +658,11 @@ void screen::cycleWindow(unsigned int state, const bool forward,
 
     // if the window is on another desktop, we can't use XSetInputFocus, since
     // it doesn't imply a workspace change.
-    if (t->desktop() == _active_desktop || t->desktop() == 0xffffffff)
-      t->focus(false); // focus, but don't raise
+    if (_stacked_raise || (t->desktop() != _active_desktop &&
+                           t->desktop() != 0xffffffff))
+      t->focus(); // raise
     else
-      t->focus(); // change workspace and focus
+      t->focus(false); // don't raise
   }  
   else {
     t->focus();
index 92533d98d3a2fb1d5592e452808635883da52425..f0f3de079d87a654eaa608a541040dfde9646be1 100644 (file)
@@ -59,6 +59,7 @@ class screen {
   bool _grabbed; // used for keygrab toggle function
   bool _cycling; // used for stacked cycling
   bool _stacked_cycling;
+  bool _stacked_raise;
 
   XWindow *findWindow(const XEvent &e) const;
   void updateNumDesktops();
This page took 0.032311 seconds and 4 git commands to generate.