comparison os2/dw.c @ 1801:889f8d47761c

Discovered that _toplevel_window() on OS/2 returned NULLHANDLE when passing in a top-level handle directly; now returns the handle.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 27 Sep 2012 04:26:34 +0000
parents 68e37fee2b05
children 9cb8660c5fa3
comparison
equal deleted inserted replaced
1800:68e37fee2b05 1801:889f8d47761c
302 302
303 /* Find the desktop window handle */ 303 /* Find the desktop window handle */
304 HWND _toplevel_window(HWND handle) 304 HWND _toplevel_window(HWND handle)
305 { 305 {
306 HWND box, lastbox = WinQueryWindow(handle, QW_PARENT); 306 HWND box, lastbox = WinQueryWindow(handle, QW_PARENT);
307
308 if(lastbox == desktop)
309 return handle;
307 310
308 /* Find the toplevel window */ 311 /* Find the toplevel window */
309 while((box = WinQueryWindow(lastbox, QW_PARENT)) != desktop && box) 312 while((box = WinQueryWindow(lastbox, QW_PARENT)) != desktop && box)
310 { 313 {
311 lastbox = box; 314 lastbox = box;