]> Dogcows Code - chaz/openbox/commitdiff
modified focus() to accept a no-raise parameter
authorMarius Nita <marius@cs.pdx.edu>
Thu, 22 Aug 2002 10:13:02 +0000 (10:13 +0000)
committerMarius Nita <marius@cs.pdx.edu>
Thu, 22 Aug 2002 10:13:02 +0000 (10:13 +0000)
util/epist/window.cc
util/epist/window.hh

index 854297197012012b7bb7721a8f437a83032a406b..5d1690f00454d7a0162f7d230024c8d25a20abae 100644 (file)
@@ -1,4 +1,4 @@
-// -*- mode: C++; indent-tabs-mode: nil; -*-
+// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 // window.cc for Epistrophy - a key handler for NETWM/EWMH window managers.
 // Copyright (c) 2002 - 2002 Ben Jansens <ben at orodu.net>
 //
@@ -261,12 +261,15 @@ void XWindow::iconify() const {
 }
 
 
-void XWindow::focus() const {
+void XWindow::focus(bool raise) const {
   // this will cause the window to be uniconified also
-  _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
-                            _window);
-  //XSetInputFocus(_epist->getXDisplay(), _window, None, CurrentTime);
+
+  if (raise) {
+    _xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
+                              _window);
+  } else {
+    XSetInputFocus(_epist->getXDisplay(), _window, None, CurrentTime);
+  }
 }
 
 
index ad00739f749e21f51f5e58f284bf932c159f3ac5..d14ec06fca56e281642ca805f46492540e17e2e4 100644 (file)
@@ -117,7 +117,7 @@ public:
   void raise() const;
   void lower() const;
   void iconify() const;
-  void focus() const;
+  void focus(bool raise = true) const;
   void decorate(bool d) const;
   void sendTo(unsigned int dest) const;
   void move(int x, int y) const;
This page took 0.024414 seconds and 4 git commands to generate.