aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-11-23 18:41:23 (GMT)
committermarkt <markt>2007-11-23 18:41:23 (GMT)
commit9ed25584a17269efe85e63fe560bf00c495258c1 (patch)
treeb784a24b12417f135635bfff4239185f01722ffa /src/WorkspaceCmd.cc
parentd482cf6a54709a5867469835490c6a4a40f1a88e (diff)
downloadfluxbox_pavel-9ed25584a17269efe85e63fe560bf00c495258c1.zip
fluxbox_pavel-9ed25584a17269efe85e63fe560bf00c495258c1.tar.bz2
make sure window commands operate on the right window
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index af0f3c5..536019c 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -54,12 +54,15 @@ void WindowListCmd::execute() {
54 54
55 FocusControl::Focusables::iterator it = win_list.begin(), 55 FocusControl::Focusables::iterator it = win_list.begin(),
56 it_end = win_list.end(); 56 it_end = win_list.end();
57 // save old value, so we can restore it later
58 WinClient *old = WindowCmd<void>::client();
57 for (; it != it_end; ++it) { 59 for (; it != it_end; ++it) {
58 if (m_pat.match(**it) && (*it)->fbwindow()) { 60 if (m_pat.match(**it) && (*it)->fbwindow()) {
59 WindowCmd<void>::setWindow((*it)->fbwindow()); 61 WindowCmd<void>::setWindow((*it)->fbwindow());
60 m_cmd->execute(); 62 m_cmd->execute();
61 } 63 }
62 } 64 }
65 WindowCmd<void>::setClient(old);
63 } 66 }
64} 67}
65 68
@@ -70,6 +73,8 @@ bool SomeCmd::bool_execute() {
70 73
71 FocusControl::Focusables::iterator it = win_list.begin(), 74 FocusControl::Focusables::iterator it = win_list.begin(),
72 it_end = win_list.end(); 75 it_end = win_list.end();
76 // save old value, so we can restore it later
77 WinClient *old = WindowCmd<void>::client();
73 for (; it != it_end; ++it) { 78 for (; it != it_end; ++it) {
74 WinClient *client = dynamic_cast<WinClient *>(*it); 79 WinClient *client = dynamic_cast<WinClient *>(*it);
75 if (!client) continue; 80 if (!client) continue;
@@ -77,6 +82,7 @@ bool SomeCmd::bool_execute() {
77 if (m_cmd->bool_execute()) 82 if (m_cmd->bool_execute())
78 return true; 83 return true;
79 } 84 }
85 WindowCmd<void>::setClient(old);
80 } 86 }
81 return false; 87 return false;
82} 88}
@@ -88,6 +94,8 @@ bool EveryCmd::bool_execute() {
88 94
89 FocusControl::Focusables::iterator it = win_list.begin(), 95 FocusControl::Focusables::iterator it = win_list.begin(),
90 it_end = win_list.end(); 96 it_end = win_list.end();
97 // save old value, so we can restore it later
98 WinClient *old = WindowCmd<void>::client();
91 for (; it != it_end; ++it) { 99 for (; it != it_end; ++it) {
92 WinClient *client = dynamic_cast<WinClient *>(*it); 100 WinClient *client = dynamic_cast<WinClient *>(*it);
93 if (!client) continue; 101 if (!client) continue;
@@ -95,6 +103,7 @@ bool EveryCmd::bool_execute() {
95 if (!m_cmd->bool_execute()) 103 if (!m_cmd->bool_execute())
96 return false; 104 return false;
97 } 105 }
106 WindowCmd<void>::setClient(old);
98 } 107 }
99 return true; 108 return true;
100} 109}