changeset 15943:7db39d873d52

Do not crash when resizing with shadows turned on.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 27 Mar 2007 01:36:24 +0000
parents c2cce5daa8ec
children 1071320641b9
files finch/libgnt/gntwidget.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntwidget.c	Mon Mar 26 04:51:25 2007 +0000
+++ b/finch/libgnt/gntwidget.c	Tue Mar 27 01:36:24 2007 +0000
@@ -521,7 +521,7 @@
 
 		widget->priv.width = width;
 		widget->priv.height = height;
-		if (width >= getmaxx(widget->window) || height >= getmaxy(widget->window)) {
+		if (width + shadow >= getmaxx(widget->window) || height + shadow >= getmaxy(widget->window)) {
 			delwin(widget->window);
 			widget->window = newpad(height + 20, width + 20);
 		}