diff options
author | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-09-14 19:36:16 (GMT) |
---|---|---|
committer | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-09-14 19:36:16 (GMT) |
commit | 91408776f0b04dbc5a5da99f555b33f9abc5a905 (patch) | |
tree | 6173a78017f7981ae1ad17825461907973a08777 /src/FbTk/ImageControl.cc | |
parent | 9f519ec0fcb7cd0dec61a4c31d246800f9a73cb3 (diff) | |
download | fluxbox-91408776f0b04dbc5a5da99f555b33f9abc5a905.zip fluxbox-91408776f0b04dbc5a5da99f555b33f9abc5a905.tar.bz2 |
Fixed a pixmap resource leak with selected pixmap in menus.
menu.hilite.selected.pixmap and menu.selected.pixmap was not
deleted while switching between non-pixmap styles and pixmap styles.
Diffstat (limited to 'src/FbTk/ImageControl.cc')
-rw-r--r-- | src/FbTk/ImageControl.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc index 38114c8..067bcde 100644 --- a/src/FbTk/ImageControl.cc +++ b/src/FbTk/ImageControl.cc | |||
@@ -227,11 +227,18 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height, | |||
227 | 227 | ||
228 | Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, | 228 | Pixmap ImageControl::renderImage(unsigned int width, unsigned int height, |
229 | const FbTk::Texture &texture, | 229 | const FbTk::Texture &texture, |
230 | FbTk::Orientation orient) { | 230 | FbTk::Orientation orient, |
231 | bool use_cache ) { | ||
231 | 232 | ||
232 | if (texture.type() & FbTk::Texture::PARENTRELATIVE) | 233 | if (texture.type() & FbTk::Texture::PARENTRELATIVE) |
233 | return ParentRelative; | 234 | return ParentRelative; |
234 | 235 | ||
236 | // If we are not suppose to cache this pixmap, just render and return it | ||
237 | if ( ! use_cache) { | ||
238 | TextureRender image(*this, width, height, orient, m_colors, m_num_colors); | ||
239 | return image.render(texture); | ||
240 | } | ||
241 | |||
235 | // search cache first | 242 | // search cache first |
236 | Pixmap pixmap = searchCache(width, height, texture, orient); | 243 | Pixmap pixmap = searchCache(width, height, texture, orient); |
237 | if (pixmap) { | 244 | if (pixmap) { |