From 5512cac1b62e233a6edc9a7bd87d32deaeda9612 Mon Sep 17 00:00:00 2001 From: rathnor Date: Sat, 14 Sep 2002 10:58:25 +0000 Subject: fix for when a window doesn't have a menu (decorations.menu == 0) --- src/Toolbar.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 81bb0ff..aa8796f 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.31 2002/09/08 19:43:15 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.32 2002/09/14 10:58:25 rathnor Exp $ #include "Toolbar.hh" @@ -1032,7 +1032,8 @@ void Toolbar::buttonPressEvent(XButtonEvent *be) { FluxboxWindow *fluxboxwin = 0; if ( iconbar && (fluxboxwin = iconbar->findWindow(be->window)) ) { Windowmenu *wm = fluxboxwin->getWindowmenu(); - fluxboxwin->showMenu(be->x_root, be->y_root - wm->height()); + if (wm) + fluxboxwin->showMenu(be->x_root, be->y_root - wm->height()); } else if (! toolbarmenu->isVisible()) { int x, y; -- cgit v0.11.2