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.
Mathias Gumz akira at fluxbox dot org
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
src/FbTk/Menu.cc
→
src/FbTk/Menu.cc
@@ -91,7 +91,7 @@ m_screen_width(DisplayWidth(FbTk::App::instance()->display(), tm->screenNum())),
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@@ -142,6 +142,9 @@ 0, 0, 10, 10,
event_mask, 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;