# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1305615329 0 # Node ID b7e7e2bc808545af8e929e0e8a1950ef65ff7f77 # Parent ce4121a6f6576cf31554c386fbdf26de50c7253e 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. diff -r ce4121a6f657 -r b7e7e2bc8085 os2/dw.c --- 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;