aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/Window.cc b/src/Window.cc
index cdfcfea..8222c06 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1013,10 +1013,21 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
1013 1013
1014 WinClient *old = m_client; 1014 WinClient *old = m_client;
1015 m_client = &client; 1015 m_client = &client;
1016
1017 bool ret = setinput && focus();
1018 if (setinput) {
1019 m_client = old;
1020 return ret;
1021 }
1022
1016 m_client->raise(); 1023 m_client->raise();
1017 if (setinput != m_focused || setinput && m_client != old) 1024 if (m_focused) {
1018 m_client->focusSig().notify(); 1025 m_client->focusSig().notify();
1019 titleSig().notify(); 1026 if (old)
1027 old->focusSig().notify();
1028 }
1029 if (old != &client)
1030 titleSig().notify();
1020 1031
1021#ifdef DEBUG 1032#ifdef DEBUG
1022 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": labelbutton[client] = "<< 1033 cerr<<"FluxboxWindow::"<<__FUNCTION__<<": labelbutton[client] = "<<
@@ -1025,16 +1036,6 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
1025 // frame focused doesn't necessarily mean input focused 1036 // frame focused doesn't necessarily mean input focused
1026 frame().setLabelButtonFocus(*button); 1037 frame().setLabelButtonFocus(*button);
1027 frame().setShapingClient(&client, false); 1038 frame().setShapingClient(&client, false);
1028
1029 bool ret = setinput && focus();
1030 if (setinput) {
1031 // restore old client until focus event comes
1032 m_client = old;
1033 if (!ret && old) {
1034 old->raise();
1035 titleSig().notify();
1036 }
1037 }
1038 return ret; 1039 return ret;
1039} 1040}
1040 1041