add 'toggleomnipresent' action
This commit is contained in:
parent
e01cab39e5
commit
5cb52056ef
5 changed files with 19 additions and 0 deletions
|
@ -40,6 +40,7 @@ public:
|
||||||
lower, //done
|
lower, //done
|
||||||
close, //done
|
close, //done
|
||||||
toggleshade, //done
|
toggleshade, //done
|
||||||
|
toggleomnipresent, //done
|
||||||
moveWindowUp,
|
moveWindowUp,
|
||||||
moveWindowDown,
|
moveWindowDown,
|
||||||
moveWindowLeft,
|
moveWindowLeft,
|
||||||
|
|
|
@ -120,6 +120,10 @@ epist::epist(char **argv, char *dpy_name, char *rc_file)
|
||||||
XKeysymToKeycode(getXDisplay(),
|
XKeysymToKeycode(getXDisplay(),
|
||||||
XStringToKeysym("I")),
|
XStringToKeysym("I")),
|
||||||
Mod1Mask | ControlMask));
|
Mod1Mask | ControlMask));
|
||||||
|
_actions.push_back(Action(Action::toggleomnipresent,
|
||||||
|
XKeysymToKeycode(getXDisplay(),
|
||||||
|
XStringToKeysym("O")),
|
||||||
|
Mod1Mask | ControlMask));
|
||||||
activateGrabs();
|
activateGrabs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -221,6 +221,13 @@ void screen::handleKeypress(const XEvent &e) {
|
||||||
window->lower();
|
window->lower();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case Action::toggleomnipresent:
|
||||||
|
if (window->desktop() == 0xffffffff)
|
||||||
|
window->sendTo(_active_desktop);
|
||||||
|
else
|
||||||
|
window->sendTo(0xffffffff);
|
||||||
|
return;
|
||||||
|
|
||||||
case Action::toggleshade:
|
case Action::toggleshade:
|
||||||
window->shade(! window->shaded());
|
window->shade(! window->shaded());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -177,3 +177,9 @@ void XWindow::focus() const {
|
||||||
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
|
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
|
||||||
_window);
|
_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void XWindow::sendTo(unsigned int dest) const {
|
||||||
|
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_wm_desktop,
|
||||||
|
_window, dest);
|
||||||
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ public:
|
||||||
void lower() const;
|
void lower() const;
|
||||||
void iconify() const;
|
void iconify() const;
|
||||||
void focus() const;
|
void focus() const;
|
||||||
|
void sendTo(unsigned int dest) const;
|
||||||
|
|
||||||
bool operator == (const XWindow &w) const { return w._window == _window; }
|
bool operator == (const XWindow &w) const { return w._window == _window; }
|
||||||
bool operator == (const Window &w) const { return w == _window; }
|
bool operator == (const Window &w) const { return w == _window; }
|
||||||
|
|
Loading…
Reference in a new issue