summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Toolbar.cc3
-rw-r--r--src/WorkspaceCmd.cc9
2 files changed, 12 insertions, 0 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 2694a4c..3639df7 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -35,6 +35,7 @@
35#include "fluxbox.hh" 35#include "fluxbox.hh"
36#include "Keys.hh" 36#include "Keys.hh"
37#include "Screen.hh" 37#include "Screen.hh"
38#include "WindowCmd.hh"
38#include "IntResMenuItem.hh" 39#include "IntResMenuItem.hh"
39#include "BoolMenuItem.hh" 40#include "BoolMenuItem.hh"
40 41
@@ -524,6 +525,7 @@ void Toolbar::reconfigure() {
524 525
525 526
526void Toolbar::buttonPressEvent(XButtonEvent &be) { 527void Toolbar::buttonPressEvent(XButtonEvent &be) {
528 WindowCmd<void>::setWindow(0);
527 if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button, 529 if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button,
528 Keys::ON_TOOLBAR)) 530 Keys::ON_TOOLBAR))
529 return; 531 return;
@@ -557,6 +559,7 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
557} 559}
558 560
559void Toolbar::enterNotifyEvent(XCrossingEvent &ce) { 561void Toolbar::enterNotifyEvent(XCrossingEvent &ce) {
562 WindowCmd<void>::setWindow(0);
560 Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0, 563 Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0,
561 Keys::ON_TOOLBAR); 564 Keys::ON_TOOLBAR);
562 if (! doAutoHide()) { 565 if (! doAutoHide()) {
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}