aboutsummaryrefslogtreecommitdiff
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
parent2ddc0290cb7bed695afab3ca7e8b130b76e66793 (diff)
downloadfluxbox-86031f9c75d7dada8fd61e5a0059d54fa42ce099.zip
fluxbox-86031f9c75d7dada8fd61e5a0059d54fa42ce099.tar.bz2
don't create gigantic images when XGetGeometry fails in FbTk::FbPixmap::copy
-rw-r--r--ChangeLog3
-rw-r--r--src/FbTk/FbPixmap.cc15
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b4a920..4d5120e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0.0: 2Changes for 1.0.0:
3*07/07/03:
4 * Fixed resource usage due to Skype 1.4, bug #1745678 (Mark)
5 FbTk/FbPixmap.cc
3*07/07/02: 6*07/07/02:
4 * Remember original size/position in apps file for shaded or maximized 7 * Remember original size/position in apps file for shaded or maximized
5 windows (Mark) 8 windows (Mark)
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;