diff options
author | fluxgen <fluxgen> | 2004-01-13 12:27:51 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-01-13 12:27:51 (GMT) |
commit | abf2bd26e35d92cd5409ff59476dc832851adfb2 (patch) | |
tree | 6d32c7d8cf4a9face420cfae3ae5bdda5d3c91b0 /src | |
parent | 75b1b052f52684a9799893b72aa92d0317af43f7 (diff) | |
download | fluxbox_paul-abf2bd26e35d92cd5409ff59476dc832851adfb2.zip fluxbox_paul-abf2bd26e35d92cd5409ff59476dc832851adfb2.tar.bz2 |
fixed crash bug
Diffstat (limited to 'src')
-rw-r--r-- | src/IconButton.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index 5733e2c..cea49c3 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: IconButton.cc,v 1.14 2004/01/11 16:08:07 fluxgen Exp $ | 23 | // $Id: IconButton.cc,v 1.15 2004/01/13 12:27:51 fluxgen Exp $ |
24 | 24 | ||
25 | #include "IconButton.hh" | 25 | #include "IconButton.hh" |
26 | 26 | ||
@@ -77,10 +77,13 @@ IconButton::IconButton(const FbTk::FbWindow &parent, const FbTk::Font &font, | |||
77 | 77 | ||
78 | FbTk::RefCount<FbTk::Command> focus(new FbTk::SimpleCommand<FluxboxWindow>(m_win, &FluxboxWindow::raiseAndFocus)); | 78 | FbTk::RefCount<FbTk::Command> focus(new FbTk::SimpleCommand<FluxboxWindow>(m_win, &FluxboxWindow::raiseAndFocus)); |
79 | FbTk::RefCount<FbTk::Command> hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus)); | 79 | FbTk::RefCount<FbTk::Command> hidemenus(new FbTk::SimpleCommand<BScreen>(win.screen(), &BScreen::hideMenus)); |
80 | FbTk::MacroCommand *focus_macro = new FbTk::MacroCommand(); | 80 | //!! TODO: There're some issues with MacroCommand when |
81 | focus_macro->add(hidemenus); | 81 | // this object dies when the last macrocommand is executed (focused cmd) |
82 | focus_macro->add(focus); | 82 | // In iconbar mode Icons |
83 | FbTk::RefCount<FbTk::Command> focus_cmd(focus_macro); | 83 | // FbTk::MacroCommand *focus_macro = new FbTk::MacroCommand(); |
84 | // focus_macro->add(hidemenus); | ||
85 | // focus_macro->add(focus); | ||
86 | FbTk::RefCount<FbTk::Command> focus_cmd(focus); | ||
84 | FbTk::RefCount<FbTk::Command> menu_cmd(new ::ShowMenu(m_win)); | 87 | FbTk::RefCount<FbTk::Command> menu_cmd(new ::ShowMenu(m_win)); |
85 | setOnClick(focus_cmd, 1); | 88 | setOnClick(focus_cmd, 1); |
86 | setOnClick(menu_cmd, 3); | 89 | setOnClick(menu_cmd, 3); |
@@ -95,6 +98,7 @@ IconButton::~IconButton() { | |||
95 | 98 | ||
96 | } | 99 | } |
97 | 100 | ||
101 | |||
98 | void IconButton::exposeEvent(XExposeEvent &event) { | 102 | void IconButton::exposeEvent(XExposeEvent &event) { |
99 | if (m_icon_window == event.window) | 103 | if (m_icon_window == event.window) |
100 | m_icon_window.clear(); | 104 | m_icon_window.clear(); |