# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1052774355 0 # Node ID fecd529ba9d4d11893ae7c8394671c6cf759fde0 # Parent a8124a9561c726d281d0dc9f30cf202481546a93 Use dW_box_new() instead of WinCreateWindow() to make the container window for the comboboxes so that the owner message are correctly handled. diff -r a8124a9561c7 -r fecd529ba9d4 os2/dw.c --- a/os2/dw.c Sun May 11 06:10:14 2003 +0000 +++ b/os2/dw.c Mon May 12 21:19:15 2003 +0000 @@ -3481,7 +3481,7 @@ thisbox->items = tmpitem; free(thisitem); thisbox->count--; - _free_window_memory(handle); + _free_window_memory(frame ? frame : handle); } return WinDestroyWindow(frame ? frame : handle); } @@ -4206,17 +4206,7 @@ HWND API dw_combobox_new(char *text, ULONG id) { WindowData *blah = calloc(1, sizeof(WindowData)); - HWND frame = WinCreateWindow(HWND_OBJECT, - WC_FRAME, - NULL, - WS_VISIBLE | WS_CLIPCHILDREN | - FS_NOBYTEALIGN, - 0,0,2000,1000, - NULLHANDLE, - HWND_TOP, - 0L, - NULL, - NULL); + HWND frame = dw_box_new(DW_HORZ, 0); HWND tmp = WinCreateWindow(frame, WC_COMBOBOX, text, @@ -4245,6 +4235,7 @@ dw_window_set_color(tmp, DW_CLR_BLACK, DW_CLR_WHITE); dw_window_set_data(tmp, "_dw_comboentry", (void *)last); dw_window_set_data(tmp, "_dw_combo_box", (void *)frame); + WinSetOwner(tmp, frame); return tmp; } @@ -5039,7 +5030,7 @@ /* Don't set the ownership if it's an entryfield or spinbutton */ WinQueryClassName(item, 99, tmpbuf); - if(strncmp(tmpbuf, "#6", 3)!=0 && strncmp(tmpbuf, "#32", 4)!=0) + if(strncmp(tmpbuf, "#6", 3)!=0 && strncmp(tmpbuf, "#32", 4)!=0 && strncmp(tmpbuf, "#2", 3)!=0) WinSetOwner(item, box); WinSetParent(frame ? frame : item, box, FALSE); } @@ -7668,7 +7659,7 @@ WinQueryClassName(item, 99, tmpbuf); /* Don't set the ownership if it's an entryfield or spinbutton */ - if(strncmp(tmpbuf, "#6", 3)!=0 && strncmp(tmpbuf, "#32", 4)!=0) + if(strncmp(tmpbuf, "#6", 3)!=0 && strncmp(tmpbuf, "#32", 4)!=0 && strncmp(tmpbuf, "#2", 3)!=0) WinSetOwner(item, box); WinSetParent(frame ? frame : item, box, FALSE); }