changeset 1016:b7e7e2bc8085

While debugging an the lack of SELECT event in containers initially.... I discovered that my last scrollbox free_memory fix wasn't quite right. This one should really fix the crash on freeing of the scrollbox.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 17 May 2011 06:55:29 +0000
parents ce4121a6f657
children 362e584fb3bd
files os2/dw.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Tue May 17 03:54:06 2011 +0000
+++ b/os2/dw.c	Tue May 17 06:55:29 2011 +0000
@@ -4307,20 +4307,20 @@
 {
    HWND hwndframe, box = dw_box_new(type, pad);
    HWND client, tmpbox = dw_box_new(DW_VERT, 0);
-   WindowData *blah = calloc(sizeof(WindowData), 1);
+   Box *blah = calloc(sizeof(Box), 1);
    dw_box_pack_start(tmpbox, box, 1, 1, TRUE, TRUE, 0);
    hwndframe = WinCreateWindow(HWND_OBJECT, ScrollClassName, "", WS_VISIBLE | WS_CLIPCHILDREN,
-                        0, 0, 2000, 1000, NULLHANDLE, HWND_TOP, 0, NULL, NULL);
+                               0, 0, 2000, 1000, NULLHANDLE, HWND_TOP, 0, NULL, NULL);
    WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_VERT,
-               0,0,2000,1000, hwndframe, HWND_TOP, FID_VERTSCROLL, NULL, NULL);
-    WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_HORZ,
-               0,0,2000,1000, hwndframe, HWND_TOP, FID_HORZSCROLL, NULL, NULL);
-    client = WinCreateWindow(hwndframe, WC_FRAME, "", WS_VISIBLE | WS_CLIPCHILDREN,
+                   0,0,2000,1000, hwndframe, HWND_TOP, FID_VERTSCROLL, NULL, NULL);
+   WinCreateWindow(hwndframe, WC_SCROLLBAR, "", WS_VISIBLE | SBS_AUTOTRACK | SBS_HORZ,
+                   0,0,2000,1000, hwndframe, HWND_TOP, FID_HORZSCROLL, NULL, NULL);
+   client = WinCreateWindow(hwndframe, WC_FRAME, "", WS_VISIBLE | WS_CLIPCHILDREN,
                       0,0,2000,1000, NULLHANDLE, HWND_TOP, FID_CLIENT, NULL, NULL);
    WinSetParent(tmpbox, client, FALSE);
-   WinSetWindowPtr(hwndframe, QWP_USER, blah);
+   WinSetWindowPtr(client, QWP_USER, blah);
    dw_window_set_data(hwndframe, "_dw_resizebox", (void *)tmpbox);
-    dw_window_set_data(hwndframe, "_dw_box", (void *)box);
+   dw_window_set_data(hwndframe, "_dw_box", (void *)box);
    dw_window_set_color(hwndframe, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY);
    dw_window_set_color(client, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY);
    return hwndframe;