From 6d95ba1af2fda9602a1337c371d46d45d8c4d747 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 3 Dec 2003 00:49:20 +0000 Subject: hide toolbar menu on root window click --- src/fluxbox.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index e63a121..6d560e6 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.202 2003/12/03 00:30:22 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.203 2003/12/03 00:49:20 fluxgen Exp $ #include "fluxbox.hh" @@ -983,6 +983,14 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { screen->slit()->menu().hide(); #endif // SLIT +#ifdef USE_TOOLBAR + // hide toolbar that matches screen + for (int toolbar = 0; toolbar < m_toolbars.size(); ++toolbar) { + if (&(m_toolbars[toolbar]->screen()) == screen) + m_toolbars[toolbar]->menu().hide(); + } +#endif // USE_TOOLBAR + if (be.button == 1) { if (! screen->isRootColormapInstalled()) screen->imageControl().installRootColormap(); -- cgit v0.11.2