From 689fdc77b09b238073e59bbb71c2a8e8b3875974 Mon Sep 17 00:00:00 2001 From: rathnor Date: Tue, 9 Dec 2003 12:28:24 +0000 Subject: focus tweak - ignore NotifyInferior --- ChangeLog | 3 +++ src/fluxbox.cc | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d6c8d11..0655276 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.7: *03/12/09: + * Ignore NotifyInferior focus changes (Simon) + - trying to pin down various focus issues... does this help/hinder? + fluxbox.cc * New theme items: (Simon) window.label.active: window.label.active.textColor: diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 66c9a53..5290cf1 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.205 2003/12/08 17:32:08 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.206 2003/12/09 12:28:24 rathnor Exp $ #include "fluxbox.hh" @@ -922,23 +922,27 @@ void Fluxbox::handleEvent(XEvent * const e) { } } break; case FocusIn: { - + // a grab is something of a pseudo-focus event, so we ignore // them, here we ignore some window receiving it if (e->xfocus.mode == NotifyGrab || - e->xfocus.detail == NotifyPointer) + e->xfocus.detail == NotifyPointer || + e->xfocus.detail == NotifyInferior) break; WinClient *winclient = searchWindow(e->xfocus.window); if (winclient && m_focused_window != winclient) setFocusedWindow(winclient); - + } break; case FocusOut:{ + // and here we ignore some window losing the special grab focus if (e->xfocus.mode == NotifyGrab || - e->xfocus.detail == NotifyPointer) + e->xfocus.detail == NotifyPointer || + e->xfocus.detail == NotifyInferior) break; + WinClient *winclient = searchWindow(e->xfocus.window); if (winclient == 0 && FbTk::Menu::focused() == 0) { #ifdef DEBUG -- cgit v0.11.2