]> Dogcows Code - chaz/openbox/commitdiff
add next/prev window on all workspaces
authorDana Jansens <danakj@orodu.net>
Sat, 20 Jul 2002 09:58:49 +0000 (09:58 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 20 Jul 2002 09:58:49 +0000 (09:58 +0000)
util/epist/actions.hh
util/epist/epist.cc
util/epist/screen.cc
util/epist/window.cc
util/epist/window.hh

index 6506f0e729055586d22b318c8eb6e3f3bbe34cf1..0588692d64de549bcddeca6c394aca2d7a5e0871 100644 (file)
@@ -47,8 +47,8 @@ public:
 
     nextWindow, //done for now
     prevWindow, //done for now
-    nextWindowOnAllWorkspaces,
-    prevWindowOnAllWorkspaces,
+    nextWindowOnAllWorkspaces, //done
+    prevWindowOnAllWorkspaces, //done
 
     nextWindowOfClass,
     prevWindowOfClass,
index 7b2b432d353159107f055d8a6fe6d905d9f886d6..7ac2daf564b2d15c389a5bfe0482c455d56dc870 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::nextWindowOnAllWorkspaces,
+                            XKeysymToKeycode(getXDisplay(),
+                                             XStringToKeysym("Tab")),
+                            Mod1Mask | ControlMask));
+  _actions.push_back(Action(Action::prevWindowOnAllWorkspaces,
+                           XKeysymToKeycode(getXDisplay(),
+                                             XStringToKeysym("Tab")),
+                           Mod1Mask | ShiftMask | ControlMask));
   _actions.push_back(Action(Action::raise,
                            XKeysymToKeycode(getXDisplay(),
                                              XStringToKeysym("Up")),
index c7c2a42d53affd49c81f421d3a90acdfec55f5ee..72ee34352dea39616dea96de51902664a0ec68fa 100644 (file)
@@ -356,16 +356,8 @@ void screen::cycleWindow(const bool forward, const bool alldesktops) const {
            (*target)->iconic() ||
            (! alldesktops && (*target)->desktop() != _active_desktop));
   
-  if (target != _clients.end()) {
-    if ((*target)->desktop() != _active_desktop)
-      changeWorkspace((*target)->desktop());
-
-    // we dont send an ACTIVE_WINDOW client message because that would also
-    // unshade the window if it was shaded
-    XSetInputFocus(_epist->getXDisplay(), (*target)->window(), RevertToNone,
-                   CurrentTime);
-    XRaiseWindow(_epist->getXDisplay(), (*target)->window());
-  }
+  if (target != _clients.end())
+    (*target)->focus();
 }
 
 
index c2dff72a3e655dc9f3c30b65af5334c3710d118f..376446a465666250ccc53a14bd96c8f5d6ce5c1c 100644 (file)
@@ -170,3 +170,10 @@ void XWindow::iconify() const {
   _xatom->sendClientMessage(_screen->rootWindow(), XAtom::wm_change_state,
                             _window, IconicState);
 }
+
+
+void XWindow::focus() const {
+  // this will also unshade the window..
+  _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
+                            _window);
+}
index 29e2d6ffcffe54e85f572af4b5fe81d18f10d3fd..44df2135e7437eb434522ca0de40f8911f60796f 100644 (file)
@@ -85,6 +85,7 @@ public:
   void raise() const;
   void lower() const;
   void iconify() const;
+  void focus() const;
 
   bool operator == (const XWindow &w) const { return w._window == _window; }
   bool operator == (const Window &w) const { return w == _window; }
This page took 0.028912 seconds and 4 git commands to generate.