aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-21 20:07:41 (GMT)
committerfluxgen <fluxgen>2004-01-21 20:07:41 (GMT)
commit173d740377112dedb508ce61341e405d1a51a7d8 (patch)
treedcd8888047dcf66bce5771c4945c09dc5c426bfd /src
parent660b3bddd64ac8463714f037b3e1322f694ccd20 (diff)
downloadfluxbox-173d740377112dedb508ce61341e405d1a51a7d8.zip
fluxbox-173d740377112dedb508ce61341e405d1a51a7d8.tar.bz2
check valid attr.height and width
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/FbWindow.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 9a91099..195eeea 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWindow.cc,v 1.30 2004/01/08 22:04:39 fluxgen Exp $ 22// $Id: FbWindow.cc,v 1.31 2004/01/21 20:07:41 fluxgen Exp $
23 23
24#include "FbWindow.hh" 24#include "FbWindow.hh"
25 25
@@ -285,8 +285,16 @@ void FbWindow::setNew(Window win) {
285 m_window, 285 m_window,
286 &attr) != 0 && attr.screen != 0) { 286 &attr) != 0 && attr.screen != 0) {
287 m_screen_num = XScreenNumberOfScreen(attr.screen); 287 m_screen_num = XScreenNumberOfScreen(attr.screen);
288 m_width = attr.width; 288 if (attr.width <= 0)
289 m_height = attr.height ; 289 m_width = 1;
290 else
291 m_width = attr.width;
292
293 if (attr.height <= 0)
294 m_height = 1;
295 else
296 m_height = attr.height;
297
290 m_x = attr.x; 298 m_x = attr.x;
291 m_y = attr.y; 299 m_y = attr.y;
292 m_depth = attr.depth; 300 m_depth = attr.depth;