aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 5c27c45..4ddd8c8 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1002,6 +1002,11 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
1002 if (client.fbwindow() != this) 1002 if (client.fbwindow() != this)
1003 return false; 1003 return false;
1004 1004
1005 IconButton *button = m_labelbuttons[&client];
1006 // in case the window is being destroyed, but this should never happen
1007 if (!button)
1008 return false;
1009
1005 m_client = &client; 1010 m_client = &client;
1006 m_client->raise(); 1011 m_client->raise();
1007 m_client->focusSig().notify(); 1012 m_client->focusSig().notify();
@@ -1009,10 +1014,10 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
1009 1014
1010#ifdef DEBUG 1015#ifdef DEBUG
1011 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": labelbutton[client] = "<< 1016 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": labelbutton[client] = "<<
1012 m_labelbuttons[m_client]<<endl; 1017 button<<endl;
1013#endif // DEBUG 1018#endif // DEBUG
1014 // frame focused doesn't necessarily mean input focused 1019 // frame focused doesn't necessarily mean input focused
1015 frame().setLabelButtonFocus(*m_labelbuttons[m_client]); 1020 frame().setLabelButtonFocus(*button);
1016 1021
1017 return setinput && focus(); 1022 return setinput && focus();
1018} 1023}
@@ -2379,8 +2384,7 @@ bool FluxboxWindow::allowsFocusFromClient() {
2379 2384
2380 FluxboxWindow *cur = FocusControl::focusedFbWindow(); 2385 FluxboxWindow *cur = FocusControl::focusedFbWindow();
2381 WinClient *client = FocusControl::focusedWindow(); 2386 WinClient *client = FocusControl::focusedWindow();
2382 if (cur && client && cur->isTyping() && (!client->window_group || 2387 if (cur && client && cur->isTyping() &&
2383 client->window_group != m_client->window_group) &&
2384 getRootTransientFor(m_client) != getRootTransientFor(client)) 2388 getRootTransientFor(m_client) != getRootTransientFor(client))
2385 return false; 2389 return false;
2386 2390