Another attempt at the window stacking problem in WIN32. It does fix the issue described in STR #1296 without the negative effects described by Torsten Giebl.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-06-20 08:55:43 +00:00
parent eea2b38b34
commit 87bb58803a
1 changed files with 6 additions and 1 deletions

View File

@ -952,7 +952,12 @@ void Fl_Window::hide() {
if (ip->region) XDestroyRegion(ip->region);
#ifdef WIN32
CloseWindow(ip->xid);
// this little trickery seems to avoid the popup window stacking problem
HWND p = GetForegroundWindow();
if (p==GetParent(ip->xid)) {
ShowWindow(ip->xid, SW_HIDE);
ShowWindow(p, SW_SHOWNA);
}
XDestroyWindow(fl_display, ip->xid);
#elif defined(__APPLE_QD__)
if ( !parent() ) // don't destroy shared windows!