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

index 710606ba16ed3f5d6295cc9a72d6bf1dcc9652a6..6506f0e729055586d22b318c8eb6e3f3bbe34cf1 100644 (file)
@@ -35,7 +35,7 @@ public:
   enum ActionType {
     noaction = 0,
     execute,
-    iconify,
+    iconify, //done
     raise, //done
     lower, //done
     close, //done
index 3654150d62c3cd31f928900c57eeddf18046a5f9..7b2b432d353159107f055d8a6fe6d905d9f886d6 100644 (file)
@@ -108,6 +108,10 @@ epist::epist(char **argv, char *dpy_name, char *rc_file)
                            XKeysymToKeycode(getXDisplay(),
                                              XStringToKeysym("Down")),
                            Mod1Mask));
+  _actions.push_back(Action(Action::iconify,
+                           XKeysymToKeycode(getXDisplay(),
+                                             XStringToKeysym("I")),
+                           Mod1Mask | ControlMask));
   activateGrabs();
 }
 
index db812878fdf250cee873b20f174ee12eaa1e2a1c..d8d8edcaa5de748451d4cfeee39417b41bce42b0 100644 (file)
@@ -175,6 +175,10 @@ void screen::handleKeypress(const XEvent &e) {
         XWindow *window = *_active;
 
         switch (it->type()) {
+        case Action::iconify:
+          window->iconify();
+          return;
+
         case Action::close:
           window->close();
           return;
index 55b0babd04f4147cb0d09dce19f30fbf6243c435..7b500d039b335d13ed226ccf9ef26d91aef486ad 100644 (file)
@@ -60,6 +60,7 @@ public:
   
   inline Window rootWindow() const { return _root; }
   inline bool managed() const { return _managed; }
+  inline int number() const { return _number; }
   
   void processEvent(const XEvent &e);
 
index 592aa73e60fb2492384ddc5f593fc6e7f0b4ffe9..c2dff72a3e655dc9f3c30b65af5334c3710d118f 100644 (file)
@@ -164,3 +164,9 @@ void XWindow::raise() const {
 void XWindow::lower() const {
   XLowerWindow(_epist->getXDisplay(), _window);
 }
+
+
+void XWindow::iconify() const {
+  _xatom->sendClientMessage(_screen->rootWindow(), XAtom::wm_change_state,
+                            _window, IconicState);
+}
index 3b118375235c9a0b712de04f157ef3fce0a1c411..29e2d6ffcffe54e85f572af4b5fe81d18f10d3fd 100644 (file)
@@ -84,6 +84,7 @@ public:
   void close() const;
   void raise() const;
   void lower() const;
+  void iconify() const;
 
   bool operator == (const XWindow &w) const { return w._window == _window; }
   bool operator == (const Window &w) const { return w == _window; }
This page took 0.031349 seconds and 4 git commands to generate.