diff options
| author | Manolo Gouy <Manolo> | 2011-05-23 16:49:02 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-05-23 16:49:02 +0000 |
| commit | b3f6de1f373736d9291630d9af2952be34ac927f (patch) | |
| tree | 5a7053801b2f8c08ba4278f4c4797c6f8b536d8a /src/Fl.cxx | |
| parent | 4614fffc296a3dd54928f745fff002e8efed1a61 (diff) | |
Fix STR #2627: if an X11 window is externally destroyed, FLTK now reacts coherently
either deleting the corresponding FLTK window, or recreating the X11 window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 70e1fc7b9..ac58a33f0 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1439,7 +1439,8 @@ void Fl_Window::hide() { # if USE_XFT fl_destroy_xft_draw(ip->xid); # endif - XDestroyWindow(fl_display, ip->xid); + // this test makes sure ip->xid has not been destroyed already + if (ip->xid) XDestroyWindow(fl_display, ip->xid); #elif defined(WIN32) // this little trickery seems to avoid the popup window stacking problem HWND p = GetForegroundWindow(); |
