aboutsummaryrefslogtreecommitdiff
path: root/src/ClientMenu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientMenu.cc')
-rw-r--r--src/ClientMenu.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ClientMenu.cc b/src/ClientMenu.cc
index c70da85..ae35aab 100644
--- a/src/ClientMenu.cc
+++ b/src/ClientMenu.cc
@@ -46,9 +46,14 @@ public:
46 FluxboxWindow *fbwin = m_client.fbwindow(); 46 FluxboxWindow *fbwin = m_client.fbwindow();
47 if (fbwin == 0) 47 if (fbwin == 0)
48 return; 48 return;
49
50 // this MenuItem object can get destroyed as a result of focus(), so we
51 // must get a local copy of the parent menu
52 FbTk::Menu *parent = menu();
53
49 m_client.focus(); 54 m_client.focus();
50 fbwin->raise(); 55 fbwin->raise();
51 menu()->hide(); 56 parent->hide();
52 } 57 }
53 58
54 const std::string &label() const { return m_client.title(); } 59 const std::string &label() const { return m_client.title(); }