From 9e6c12361113669fad460d66521faaa03102936e Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 29 Jun 2006 18:01:33 +0000 Subject: Fixing my own code --- src/FocusControl.cc | 3 +-- src/FocusControl.hh | 2 ++ src/fluxbox.cc | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/FocusControl.cc b/src/FocusControl.cc index f469521..664d41d 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc @@ -480,8 +480,7 @@ void FocusControl::setFocusedWindow(WinClient *client) { if (s_focused_window != 0 && Fluxbox::instance()->validateClient(s_focused_window)) { - if (!client || - s_focused_fbwindow && client->fbwindow() != s_focused_fbwindow) + if (!client && s_focused_fbwindow) s_focused_fbwindow->setFocusFlag(false); } else { diff --git a/src/FocusControl.hh b/src/FocusControl.hh index 6a868a6..7fcfb2d 100644 --- a/src/FocusControl.hh +++ b/src/FocusControl.hh @@ -101,7 +101,9 @@ public: // like revertFocus, but specifically related to this window (transients etc) static void unfocusWindow(WinClient &client, bool full_revert = true, bool unfocus_frame = false); static void setFocusedWindow(WinClient *focus_to); + static void setFocusedFbWindow(FluxboxWindow *focus_to) { s_focused_fbwindow = focus_to; } static WinClient *focusedWindow() { return s_focused_window; } + static FluxboxWindow *focusedFbWindow() { return s_focused_fbwindow; } private: BScreen &m_screen; diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 3d9cc58..dd1c391 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -1227,8 +1227,8 @@ void Fluxbox::update(FbTk::Subject *changedsub) { // make sure each workspace get this BScreen &scr = win.screen(); scr.removeWindow(&win); - if (FocusControl::focusedWindow() == &win.winClient()) - FocusControl::setFocusedWindow(0); + if (FocusControl::focusedFbWindow() == &win) + FocusControl::setFocusedFbWindow(0); } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal for (AtomHandlerContainerIt it= m_atomhandler.begin(); -- cgit v0.11.2