aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbPixmap.cc25
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
128void FbPixmap::copy(const FbPixmap &the_copy) { 128void 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());