don't create gigantic images when XGetGeometry fails in FbTk::FbPixmap::copy

This commit is contained in:
markt 2007-07-03 01:55:44 +00:00
parent 2ddc0290cb
commit 86031f9c75
2 changed files with 11 additions and 7 deletions

View file

@ -1,5 +1,8 @@
(Format: Year/Month/Day)
Changes for 1.0.0:
*07/07/03:
* Fixed resource usage due to Skype 1.4, bug #1745678 (Mark)
FbTk/FbPixmap.cc
*07/07/02:
* Remember original size/position in apps file for shaded or maximized
windows (Mark)

View file

@ -166,13 +166,14 @@ void FbPixmap::copy(Pixmap pm, unsigned int depth, int screen_num) {
unsigned int border_width, bpp;
unsigned int new_width, new_height;
XGetGeometry(display(),
pm,
&root,
&x, &y,
&new_width, &new_height,
&border_width,
&bpp);
if (!XGetGeometry(display(),
pm,
&root,
&x, &y,
&new_width, &new_height,
&border_width,
&bpp))
return;
if (depth == 0)
depth = bpp;