add next/prev window on all workspaces
Dana Jansens danakj@orodu.net
5 files changed,
20 insertions(+),
12 deletions(-)
M
util/epist/actions.hh
→
util/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.cc
→
util/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.cc
→
util/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.cc
→
util/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.hh
→
util/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; }