Mercurial > dwindows
comparison os2/dw.c @ 1466:65986481a3d8
Rewrote _toplevel_window() on OS/2 so it is more accurate...
Should allow packing boxes that aren't already packed again.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 18 Dec 2011 11:34:41 +0000 |
parents | 98de42fc664d |
children | 1794caee0758 |
comparison
equal
deleted
inserted
replaced
1465:0f9c6f7636db | 1466:65986481a3d8 |
---|---|
252 HWND _toplevel_window(HWND handle) | 252 HWND _toplevel_window(HWND handle) |
253 { | 253 { |
254 HWND box, lastbox = WinQueryWindow(handle, QW_PARENT); | 254 HWND box, lastbox = WinQueryWindow(handle, QW_PARENT); |
255 | 255 |
256 /* Find the toplevel window */ | 256 /* Find the toplevel window */ |
257 while((box = WinQueryWindow(lastbox, QW_PARENT)) != desktop && box > 0) | 257 while((box = WinQueryWindow(lastbox, QW_PARENT)) != desktop && box) |
258 { | 258 { |
259 lastbox = box; | 259 lastbox = box; |
260 } | 260 } |
261 if(box > 0) | 261 if(box) |
262 return lastbox; | 262 { |
263 return handle; | 263 char tmpbuf[100] = {0}; |
264 | |
265 WinQueryClassName(lastbox, 99, (PCH)tmpbuf); | |
266 if(strncmp(tmpbuf, "#1", 3) == 0) | |
267 return lastbox; | |
268 } | |
269 return NULLHANDLE; | |
264 } | 270 } |
265 | 271 |
266 | 272 |
267 /* Returns height of specified window. */ | 273 /* Returns height of specified window. */ |
268 int _get_height(HWND handle) | 274 int _get_height(HWND handle) |