From 7fdb0676a7c8ad87a15635cb4baeeac0566f8dcb Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Thu, 9 Sep 2010 23:23:33 +0200 Subject: bugfix: initialize the Shape of a menu AFTER we created the window for the menu on startup a lot of 'Fluxbox: X Error: BadDrawable (invalid Pixmap ...)' occured. this was caused by using an empty 'Window' to create the shape. --- src/FbTk/Menu.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 811964c..5d93bbd 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -91,7 +91,7 @@ Menu::Menu(FbTk::ThemeProxy &tm, ImageControl &imgctrl): m_screen_height(DisplayHeight(FbTk::App::instance()->display(), tm->screenNum())), m_alignment(ALIGNDONTCARE), m_active_index(-1), - m_shape(new Shape(fbwindow(), tm->shapePlaces())), + m_shape(0), m_need_update(true) { // setup timers @@ -143,6 +143,9 @@ Menu::Menu(FbTk::ThemeProxy &tm, ImageControl &imgctrl): true, // override redirect true); // save_under + // initialize 'shape' here AFTER we created menu.window aka fbwindow() + m_shape.reset(new Shape(fbwindow(), tm->shapePlaces())); + // strip focus change mask from attrib, since we should only use it with main window event_mask ^= FocusChangeMask; -- cgit v0.11.2