From 853b0340373b81110c151e97189dea16938d3dd9 Mon Sep 17 00:00:00 2001 From: simonb Date: Wed, 19 Apr 2006 06:55:14 +0000 Subject: mouse focus fixes - thanks Scott Kuhl: skuhl AT cs utah edu --- ChangeLog | 2 ++ src/FocusControl.hh | 1 + src/Window.cc | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe452ad..cd4ae91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.16: *06/04/19: + * Fixes to Mouse Focus (thanks Scott Kuhl; skuhl AT cs utah edu) + Window.cc * Allow ~ in "background" pixmap options (Simon + thanks_markt) RootTheme.cc * Windows keep relative position in ArrangeWindows (Mathias) diff --git a/src/FocusControl.hh b/src/FocusControl.hh index 0d9cd05..65363dd 100644 --- a/src/FocusControl.hh +++ b/src/FocusControl.hh @@ -82,6 +82,7 @@ public: void dirFocus(FluxboxWindow &win, FocusDir dir); bool isMouseFocus() const { return focusModel() == MOUSEFOCUS; } bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; } + bool isCycling() const { return m_cycling_focus; } void addFocusFront(WinClient &client); void addFocusBack(WinClient &client); diff --git a/src/Window.cc b/src/Window.cc index e766cab..4ced1c6 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2662,7 +2662,7 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) { frame().buttonPressEvent(be); if (be.button == 1 || (be.button == 3 && be.state == Mod1Mask)) { - if ((! focused) && (! screen().focusControl().isMouseFocus())) { //check focus + if ( (! focused) ) { //check focus setInputFocus(); } @@ -3024,7 +3024,7 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { sa.enter = sa.leave = False; XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa); - if ((!sa.leave || sa.inferior)) { + if ((!sa.leave || sa.inferior) && !screen().focusControl().isCycling() ) { setInputFocus(); } } -- cgit v0.11.2