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.
This commit is contained in:
parent
2b9a38cba5
commit
7fdb0676a7
1 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,7 @@ Menu::Menu(FbTk::ThemeProxy<MenuTheme> &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<MenuTheme> &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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue