diff win/dw.c @ 1803:5ed9f7ea3882

Make sure _toplevel_window() when passed a top-level window returns itself on Windows.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 27 Sep 2012 07:30:30 +0000
parents 165f6ffa8176
children 83b2bd4ca2a3
line wrap: on
line diff
--- a/win/dw.c	Thu Sep 27 05:09:10 2012 +0000
+++ b/win/dw.c	Thu Sep 27 07:30:30 2012 +0000
@@ -1249,6 +1249,9 @@
 {
    HWND box, lastbox = GetParent(handle);
 
+   if(!lastbox)
+      lastbox = handle;
+      
    /* Find the toplevel window */
    while((box = GetParent(lastbox)))
    {