add raising and lowering
This commit is contained in:
parent
5bf463ea95
commit
b94699afc3
5 changed files with 30 additions and 2 deletions
|
@ -36,8 +36,8 @@ public:
|
||||||
noaction = 0,
|
noaction = 0,
|
||||||
execute,
|
execute,
|
||||||
iconify,
|
iconify,
|
||||||
raise,
|
raise, //done
|
||||||
lower,
|
lower, //done
|
||||||
close, //done
|
close, //done
|
||||||
toggleshade, //done
|
toggleshade, //done
|
||||||
moveWindowUp,
|
moveWindowUp,
|
||||||
|
|
|
@ -100,6 +100,14 @@ epist::epist(char **argv, char *dpy_name, char *rc_file)
|
||||||
XKeysymToKeycode(getXDisplay(),
|
XKeysymToKeycode(getXDisplay(),
|
||||||
XStringToKeysym("Tab")),
|
XStringToKeysym("Tab")),
|
||||||
Mod1Mask | ShiftMask));
|
Mod1Mask | ShiftMask));
|
||||||
|
_actions.push_back(Action(Action::raise,
|
||||||
|
XKeysymToKeycode(getXDisplay(),
|
||||||
|
XStringToKeysym("Up")),
|
||||||
|
Mod1Mask));
|
||||||
|
_actions.push_back(Action(Action::lower,
|
||||||
|
XKeysymToKeycode(getXDisplay(),
|
||||||
|
XStringToKeysym("Down")),
|
||||||
|
Mod1Mask));
|
||||||
activateGrabs();
|
activateGrabs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,14 @@ void screen::handleKeypress(const XEvent &e) {
|
||||||
window->close();
|
window->close();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case Action::raise:
|
||||||
|
window->raise();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Action::lower:
|
||||||
|
window->lower();
|
||||||
|
return;
|
||||||
|
|
||||||
case Action::toggleshade:
|
case Action::toggleshade:
|
||||||
window->shade(! window->shaded());
|
window->shade(! window->shaded());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -154,3 +154,13 @@ void XWindow::close() const {
|
||||||
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_close_window,
|
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_close_window,
|
||||||
_window);
|
_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void XWindow::raise() const {
|
||||||
|
XRaiseWindow(_epist->getXDisplay(), _window);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void XWindow::lower() const {
|
||||||
|
XLowerWindow(_epist->getXDisplay(), _window);
|
||||||
|
}
|
||||||
|
|
|
@ -82,6 +82,8 @@ public:
|
||||||
|
|
||||||
void shade(const bool sh) const;
|
void shade(const bool sh) const;
|
||||||
void close() const;
|
void close() const;
|
||||||
|
void raise() const;
|
||||||
|
void lower() 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