changeset 222:7bb6cb6f612c

Another minor change... create the first pixmap to the correct window size.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 05 Feb 2003 00:22:21 +0000
parents 3fd010a0a33f
children 2581c8b2754f
files dwtest.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dwtest.c	Wed Feb 05 00:14:21 2003 +0000
+++ b/dwtest.c	Wed Feb 05 00:22:21 2003 +0000
@@ -181,12 +181,17 @@
 int DWSIGNAL configure_event(HWND hwnd, int width, int height, void *data)
 {
 	HPIXMAP old1 = text1pm, old2 = text2pm;
+	unsigned long height1;
+	int depth = dw_color_depth();
+
 	rows = height / font_height;
 	cols = width / font_width;
 
+	dw_window_get_pos_size(textbox1, NULL, NULL, NULL, &height1);
+
 	/* Create new pixmaps with the current sizes */
-	text1pm = dw_pixmap_new( textbox2, (font_width*width1)+2, height, dw_color_depth());
-	text2pm = dw_pixmap_new( textbox2, width, height, dw_color_depth());
+	text1pm = dw_pixmap_new(textbox1, (font_width*width1)+2, height1, depth);
+	text2pm = dw_pixmap_new(textbox2, width, height, depth);
 
 	/* Destroy the old pixmaps */
 	dw_pixmap_destroy(old1);