diff options
author | simonb <simonb> | 2006-06-25 14:59:34 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-25 14:59:34 (GMT) |
commit | bf9b60833f87a8b328d71dac5879bdf7a0300d6e (patch) | |
tree | d7316e26c2595fe1eb4c3ebb88d587421e789e87 /src/FbTk | |
parent | 131d04cf423b36bcfeba351eecc520b94586f729 (diff) | |
download | fluxbox-bf9b60833f87a8b328d71dac5879bdf7a0300d6e.zip fluxbox-bf9b60833f87a8b328d71dac5879bdf7a0300d6e.tar.bz2 |
fix FbPixmap retaining pixmap (that made cache not work properly)
Also small tidy in FbWinFrame.cc
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/FbPixmap.cc | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc index 46ee97c..3aebd62 100644 --- a/src/FbTk/FbPixmap.cc +++ b/src/FbTk/FbPixmap.cc | |||
@@ -126,24 +126,17 @@ FbPixmap &FbPixmap::operator = (Pixmap pm) { | |||
126 | } | 126 | } |
127 | 127 | ||
128 | void FbPixmap::copy(const FbPixmap &the_copy) { | 128 | void FbPixmap::copy(const FbPixmap &the_copy) { |
129 | 129 | /* This function previously retained the old pixmap and copied in | |
130 | bool create_new = false; | 130 | the new contents if they had the same dimensions. |
131 | 131 | This broke the image cache, so we don't do that now. If you want to | |
132 | if (the_copy.width() != width() || | 132 | do it, then you'll need to invalidate all copies of this pixmap in |
133 | the_copy.height() != height() || | 133 | the cache */ |
134 | the_copy.depth() != depth() || | 134 | free(); |
135 | drawable() == 0) | ||
136 | create_new = true; | ||
137 | |||
138 | if (create_new) | ||
139 | free(); | ||
140 | 135 | ||
141 | if (the_copy.drawable() != 0) { | 136 | if (the_copy.drawable() != 0) { |
142 | if (create_new) { | 137 | create(the_copy.drawable(), |
143 | create(the_copy.drawable(), | 138 | the_copy.width(), the_copy.height(), |
144 | the_copy.width(), the_copy.height(), | 139 | the_copy.depth()); |
145 | the_copy.depth()); | ||
146 | } | ||
147 | 140 | ||
148 | if (drawable()) { | 141 | if (drawable()) { |
149 | GContext gc(drawable()); | 142 | GContext gc(drawable()); |