aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-07-03 01:56:09 (GMT)
committermarkt <markt>2007-07-03 01:56:09 (GMT)
commit23def97c01be675b048c178bca8092a09414753f (patch)
tree8b95db5e59a28eb4d398aa231f172c4f86deaeb7
parent163474a471f0a7a72a99a57c995c831b4a0af51b (diff)
downloadfluxbox-23def97c01be675b048c178bca8092a09414753f.zip
fluxbox-23def97c01be675b048c178bca8092a09414753f.tar.bz2
don't create gigantic pixmaps when XGetGeometry fails in FbTk::FbPixmap::copy
-rw-r--r--src/FbTk/FbPixmap.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index 43ba1a1..75dfe34 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -166,13 +166,14 @@ void FbPixmap::copy(Pixmap pm, unsigned int depth, int screen_num) {
166 unsigned int border_width, bpp; 166 unsigned int border_width, bpp;
167 unsigned int new_width, new_height; 167 unsigned int new_width, new_height;
168 168
169 XGetGeometry(display(), 169 if (!XGetGeometry(display(),
170 pm, 170 pm,
171 &root, 171 &root,
172 &x, &y, 172 &x, &y,
173 &new_width, &new_height, 173 &new_width, &new_height,
174 &border_width, 174 &border_width,
175 &bpp); 175 &bpp))
176 return;
176 177
177 if (depth == 0) 178 if (depth == 0)
178 depth = bpp; 179 depth = bpp;