aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-09 21:23:33 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-09 21:23:33 (GMT)
commit7fdb0676a7c8ad87a15635cb4baeeac0566f8dcb (patch)
tree19b3baa47ef22d305cd8fd0a958a29ef8308ae65 /src/FbTk
parent2b9a38cba5ddbe108aff7b0071bc21fbe53f8f39 (diff)
downloadfluxbox_pavel-7fdb0676a7c8ad87a15635cb4baeeac0566f8dcb.zip
fluxbox_pavel-7fdb0676a7c8ad87a15635cb4baeeac0566f8dcb.tar.bz2
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.
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc5
1 files changed, 4 insertions, 1 deletions
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<MenuTheme> &tm, ImageControl &imgctrl):
91 m_screen_height(DisplayHeight(FbTk::App::instance()->display(), tm->screenNum())), 91 m_screen_height(DisplayHeight(FbTk::App::instance()->display(), tm->screenNum())),
92 m_alignment(ALIGNDONTCARE), 92 m_alignment(ALIGNDONTCARE),
93 m_active_index(-1), 93 m_active_index(-1),
94 m_shape(new Shape(fbwindow(), tm->shapePlaces())), 94 m_shape(0),
95 m_need_update(true) { 95 m_need_update(true) {
96 // setup timers 96 // setup timers
97 97
@@ -143,6 +143,9 @@ Menu::Menu(FbTk::ThemeProxy<MenuTheme> &tm, ImageControl &imgctrl):
143 true, // override redirect 143 true, // override redirect
144 true); // save_under 144 true); // save_under
145 145
146 // initialize 'shape' here AFTER we created menu.window aka fbwindow()
147 m_shape.reset(new Shape(fbwindow(), tm->shapePlaces()));
148
146 // strip focus change mask from attrib, since we should only use it with main window 149 // strip focus change mask from attrib, since we should only use it with main window
147 event_mask ^= FocusChangeMask; 150 event_mask ^= FocusChangeMask;
148 151