modified focus() to accept a no-raise parameter
This commit is contained in:
parent
78a8ca9e53
commit
22e8615f61
2 changed files with 10 additions and 7 deletions
|
@ -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.
|
// window.cc for Epistrophy - a key handler for NETWM/EWMH window managers.
|
||||||
// Copyright (c) 2002 - 2002 Ben Jansens <ben at orodu.net>
|
// 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
|
// this will cause the window to be uniconified also
|
||||||
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
|
|
||||||
_window);
|
if (raise) {
|
||||||
|
_xatom->sendClientMessage(_screen->rootWindow(), XAtom::net_active_window,
|
||||||
//XSetInputFocus(_epist->getXDisplay(), _window, None, CurrentTime);
|
_window);
|
||||||
|
} else {
|
||||||
|
XSetInputFocus(_epist->getXDisplay(), _window, None, CurrentTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ public:
|
||||||
void raise() const;
|
void raise() const;
|
||||||
void lower() const;
|
void lower() const;
|
||||||
void iconify() const;
|
void iconify() const;
|
||||||
void focus() const;
|
void focus(bool raise = true) const;
|
||||||
void decorate(bool d) const;
|
void decorate(bool d) const;
|
||||||
void sendTo(unsigned int dest) const;
|
void sendTo(unsigned int dest) const;
|
||||||
void move(int x, int y) const;
|
void move(int x, int y) const;
|
||||||
|
|
Loading…
Reference in a new issue