all repos — openbox @ 5bb8616d44345e1f1896d94af9ea257439234179

openbox fork - make it a bit more like ryudo

added user option to modify raise behavior when stackedCycling is on
Marius Nita marius@cs.pdx.edu
commit

5bb8616d44345e1f1896d94af9ea257439234179

parent

24d14b5f322206ac56854ffcf61b76aee2729f25

M util/epist/config.ccutil/epist/config.cc

@@ -97,6 +97,7 @@ Config::BoolType type;

} bool_options[] = { { "stackedcycling", Config::stackedCycling }, + { "stackedcyclingraise", Config::stackedCyclingRaise }, { "", NUM_BOOL_TYPES } };
M util/epist/config.hhutil/epist/config.hh

@@ -36,6 +36,7 @@ public:

enum BoolType { NO_BOOL_TYPE, stackedCycling, + stackedCyclingRaise, NUM_BOOL_TYPES };
M util/epist/epistrc.5.inutil/epist/epistrc.5.in

@@ -62,18 +62,23 @@ Mod1-x { l lower; }

.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,
M util/epist/screen.ccutil/epist/screen.cc

@@ -66,7 +66,7 @@

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 @@ _info = _epist->getScreenInfo(_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 @@ }

// 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();
M util/epist/screen.hhutil/epist/screen.hh

@@ -59,6 +59,7 @@ bool _managed;

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();