all repos — openbox @ a9dfa0439bd8d4f525d5b41a22a3eb14b94d1200

openbox fork - make it a bit more like ryudo

add next/prev window on all workspaces
Dana Jansens danakj@orodu.net
commit

a9dfa0439bd8d4f525d5b41a22a3eb14b94d1200

parent

faab750f78c333c1c412023677d6d85915cb57de

M util/epist/actions.hhutil/epist/actions.hh

@@ -47,8 +47,8 @@ moveWindowRight,

nextWindow, //done for now prevWindow, //done for now - nextWindowOnAllWorkspaces, - prevWindowOnAllWorkspaces, + nextWindowOnAllWorkspaces, //done + prevWindowOnAllWorkspaces, //done nextWindowOfClass, prevWindowOfClass,
M util/epist/epist.ccutil/epist/epist.cc

@@ -100,6 +100,14 @@ _actions.push_back(Action(Action::prevWindow,

XKeysymToKeycode(getXDisplay(), XStringToKeysym("Tab")), Mod1Mask | ShiftMask)); + _actions.push_back(Action(Action::nextWindowOnAllWorkspaces, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("Tab")), + Mod1Mask | ControlMask)); + _actions.push_back(Action(Action::prevWindowOnAllWorkspaces, + XKeysymToKeycode(getXDisplay(), + XStringToKeysym("Tab")), + Mod1Mask | ShiftMask | ControlMask)); _actions.push_back(Action(Action::raise, XKeysymToKeycode(getXDisplay(), XStringToKeysym("Up")),
M util/epist/screen.ccutil/epist/screen.cc

@@ -356,16 +356,8 @@ } while (target == _clients.end() ||

(*target)->iconic() || (! alldesktops && (*target)->desktop() != _active_desktop)); - if (target != _clients.end()) { - if ((*target)->desktop() != _active_desktop) - changeWorkspace((*target)->desktop()); - - // we dont send an ACTIVE_WINDOW client message because that would also - // unshade the window if it was shaded - XSetInputFocus(_epist->getXDisplay(), (*target)->window(), RevertToNone, - CurrentTime); - XRaiseWindow(_epist->getXDisplay(), (*target)->window()); - } + if (target != _clients.end()) + (*target)->focus(); }
M util/epist/window.ccutil/epist/window.cc

@@ -170,3 +170,10 @@ void XWindow::iconify() const {

_xatom->sendClientMessage(_screen->rootWindow(), XAtom::wm_change_state, _window, IconicState); } + + +void XWindow::focus() const { + // this will also unshade the window.. + _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window, + _window); +}
M util/epist/window.hhutil/epist/window.hh

@@ -85,6 +85,7 @@ void close() const;

void raise() const; void lower() const; void iconify() const; + void focus() const; bool operator == (const XWindow &w) const { return w._window == _window; } bool operator == (const Window &w) const { return w == _window; }