aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authormarkt <markt>2007-07-03 01:55:44 (GMT)
committermarkt <markt>2007-07-03 01:55:44 (GMT)
commit86031f9c75d7dada8fd61e5a0059d54fa42ce099 (patch)
tree026c0abddcae098927950fa618821ba82f481126 /src/FbTk
parent2ddc0290cb7bed695afab3ca7e8b130b76e66793 (diff)
downloadfluxbox_paul-86031f9c75d7dada8fd61e5a0059d54fa42ce099.zip
fluxbox_paul-86031f9c75d7dada8fd61e5a0059d54fa42ce099.tar.bz2
don't create gigantic images when XGetGeometry fails in FbTk::FbPixmap::copy
Diffstat (limited to 'src/FbTk')
-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;