From 86031f9c75d7dada8fd61e5a0059d54fa42ce099 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 3 Jul 2007 01:55:44 +0000 Subject: don't create gigantic images when XGetGeometry fails in FbTk::FbPixmap::copy --- ChangeLog | 3 +++ src/FbTk/FbPixmap.cc | 15 ++++++++------- 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 @@ (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) 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) { 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; -- cgit v0.11.2