]> Dogcows Code - chaz/openbox/commitdiff
add raising and lowering
authorDana Jansens <danakj@orodu.net>
Sat, 20 Jul 2002 09:20:14 +0000 (09:20 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 20 Jul 2002 09:20:14 +0000 (09:20 +0000)
util/epist/actions.hh
util/epist/epist.cc
util/epist/screen.cc
util/epist/window.cc
util/epist/window.hh

index 1c70fc63a3d11be39bbdac1711196e5e6d4f2749..710606ba16ed3f5d6295cc9a72d6bf1dcc9652a6 100644 (file)
@@ -36,8 +36,8 @@ public:
     noaction = 0,
     execute,
     iconify,
-    raise,
-    lower,
+    raise, //done
+    lower, //done
     close, //done
     toggleshade, //done
     moveWindowUp,
index feb6cd4cc33b918bcec9833bcb4964ea0ad51b34..3654150d62c3cd31f928900c57eeddf18046a5f9 100644 (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();
 }
 
index 7c4294a07607fc07d751d0e4df77ee30eedb485f..db812878fdf250cee873b20f174ee12eaa1e2a1c 100644 (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;
index c956bdfa875b6c5b0435d0ec353a638609889923..592aa73e60fb2492384ddc5f593fc6e7f0b4ffe9 100644 (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);
+}
index 5c275d741baf67abfd2f1c381389ca11c69f826a..3b118375235c9a0b712de04f157ef3fce0a1c411 100644 (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; }
This page took 0.028498 seconds and 4 git commands to generate.