Fixing my own code

This commit is contained in:
markt 2006-06-29 18:01:33 +00:00
parent 03d3c6c99c
commit 9e6c123611
3 changed files with 5 additions and 4 deletions

View file

@ -480,8 +480,7 @@ void FocusControl::setFocusedWindow(WinClient *client) {
if (s_focused_window != 0 && if (s_focused_window != 0 &&
Fluxbox::instance()->validateClient(s_focused_window)) { Fluxbox::instance()->validateClient(s_focused_window)) {
if (!client || if (!client && s_focused_fbwindow)
s_focused_fbwindow && client->fbwindow() != s_focused_fbwindow)
s_focused_fbwindow->setFocusFlag(false); s_focused_fbwindow->setFocusFlag(false);
} else { } else {

View file

@ -101,7 +101,9 @@ public:
// like revertFocus, but specifically related to this window (transients etc) // 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 unfocusWindow(WinClient &client, bool full_revert = true, bool unfocus_frame = false);
static void setFocusedWindow(WinClient *focus_to); 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 WinClient *focusedWindow() { return s_focused_window; }
static FluxboxWindow *focusedFbWindow() { return s_focused_fbwindow; }
private: private:
BScreen &m_screen; BScreen &m_screen;

View file

@ -1227,8 +1227,8 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
// make sure each workspace get this // make sure each workspace get this
BScreen &scr = win.screen(); BScreen &scr = win.screen();
scr.removeWindow(&win); scr.removeWindow(&win);
if (FocusControl::focusedWindow() == &win.winClient()) if (FocusControl::focusedFbWindow() == &win)
FocusControl::setFocusedWindow(0); FocusControl::setFocusedFbWindow(0);
} else if ((&(win.workspaceSig())) == changedsub) { // workspace signal } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal
for (AtomHandlerContainerIt it= m_atomhandler.begin(); for (AtomHandlerContainerIt it= m_atomhandler.begin();