From 65fc419175e4e63013f97a8c72df3bb373052c97 Mon Sep 17 00:00:00 2001 From: rathnor Date: Thu, 8 May 2003 01:51:18 +0000 Subject: fix some focus problems when changing workspace --- src/Screen.cc | 6 ++++-- src/Window.cc | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index fb721a2..a628594 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.148 2003/05/08 01:04:05 fluxgen Exp $ +// $Id: Screen.cc,v 1.149 2003/05/08 01:51:18 rathnor Exp $ #include "Screen.hh" @@ -2447,7 +2447,9 @@ WinClient *BScreen::getLastFocusedWindow(int workspace) { for (; it != it_end; ++it) if ((*it)->fbwindow() && (((int)(*it)->fbwindow()->getWorkspaceNumber()) == workspace - || (*it)->fbwindow()->isStuck())) + && (!(*it)->fbwindow()->isStuck() || (*it)->fbwindow()->isFocused()))) + // only give focus to a stuck window if it is currently focused + // otherwise they tend to override normal workspace focus return *it; return 0; } diff --git a/src/Window.cc b/src/Window.cc index 967f943..b6a80ba 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.161 2003/05/07 16:44:51 rathnor Exp $ +// $Id: Window.cc,v 1.162 2003/05/08 01:51:18 rathnor Exp $ #include "Window.hh" @@ -1260,7 +1260,7 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) { m_frame.show(); - if (was_iconic || screen.doFocusNew()) + if (was_iconic && screen.doFocusNew()) setInputFocus(); if (focused != m_frame.focused()) -- cgit v0.11.2