aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc
index b44f9f7..2434d31 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -978,6 +978,11 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
978 if (client.fbwindow() != this) 978 if (client.fbwindow() != this)
979 return false; 979 return false;
980 980
981 FbTk::TextButton *button = m_labelbuttons[&client];
982 // in case the window is being destroyed, but this should never happen
983 if (!button)
984 return false;
985
981 if (&client != m_client) 986 if (&client != m_client)
982 m_screen.focusControl().setScreenFocusedWindow(client); 987 m_screen.focusControl().setScreenFocusedWindow(client);
983 m_client = &client; 988 m_client = &client;
@@ -987,10 +992,10 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
987 992
988#ifdef DEBUG 993#ifdef DEBUG
989 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": labelbutton[client] = "<< 994 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": labelbutton[client] = "<<
990 m_labelbuttons[m_client]<<endl; 995 button<<endl;
991#endif // DEBUG 996#endif // DEBUG
992 // frame focused doesn't necessarily mean input focused 997 // frame focused doesn't necessarily mean input focused
993 frame().setLabelButtonFocus(*m_labelbuttons[m_client]); 998 frame().setLabelButtonFocus(*button);
994 999
995 if (setinput && setInputFocus()) { 1000 if (setinput && setInputFocus()) {
996 return true; 1001 return true;