summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-06-20 08:55:43 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-06-20 08:55:43 +0000
commit87bb58803a171ed486f7396b19ba7baf9cfc76d2 (patch)
tree04b9ff8175c0b47bf0e56b51d21af5ffe94b537b /src
parenteea2b38b34a326542c24d1e3485cdb856d36b57c (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 600759b1e..d1a6ee812 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -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!