add raising and lowering

This commit is contained in:
Dana Jansens 2002-07-20 09:20:14 +00:00
parent 5bf463ea95
commit b94699afc3
5 changed files with 30 additions and 2 deletions

View file

@ -36,8 +36,8 @@ public:
noaction = 0,
execute,
iconify,
raise,
lower,
raise, //done
lower, //done
close, //done
toggleshade, //done
moveWindowUp,

View file

@ -100,6 +100,14 @@ epist::epist(char **argv, char *dpy_name, char *rc_file)
XKeysymToKeycode(getXDisplay(),
XStringToKeysym("Tab")),
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();
}

View file

@ -179,6 +179,14 @@ void screen::handleKeypress(const XEvent &e) {
window->close();
return;
case Action::raise:
window->raise();
return;
case Action::lower:
window->lower();
return;
case Action::toggleshade:
window->shade(! window->shaded());
return;

View file

@ -154,3 +154,13 @@ void XWindow::close() const {
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_close_window,
_window);
}
void XWindow::raise() const {
XRaiseWindow(_epist->getXDisplay(), _window);
}
void XWindow::lower() const {
XLowerWindow(_epist->getXDisplay(), _window);
}

View file

@ -82,6 +82,8 @@ public:
void shade(const bool sh) const;
void close() const;
void raise() const;
void lower() const;
bool operator == (const XWindow &w) const { return w._window == _window; }
bool operator == (const Window &w) const { return w == _window; }