summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-06-18 08:43:37 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-06-18 08:43:37 +0000
commit18dbfc8a5762259314a01a14b5ed5e5e49c35194 (patch)
tree2934c9cdd424bb9061c371482475039190593153
parentdc296ba4c02cc450dfaa7e40dfba0783580ea23d (diff)
STR #1706: mapping a subwindow with an unmapped parent window would crash under X11.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5911 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--src/Fl_x.cxx8
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 280e7d1c3..e5a33c4ad 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,8 @@ CHANGES IN FLTK 1.1.8
- Documentation fixes (STR #1454, STR #1455, STR #1456,
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
STR #1639, STR #1645, STR #1644)
+ - Fixed mapping of subwindows with unmapped parent
+ windows (STR #1706)
- Fixed rendering of grayscale images with alpha
channel (STR #1703)
- Fixed occasional incomplete refresh (STR #1681)
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 696cda10c..5603b22c8 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1134,6 +1134,14 @@ void Fl_X::make_xid(Fl_Window* win, XVisualInfo *visual, Colormap colormap)
if (Y < scr_y) Y = scr_y;
}
+ // if the window is a subwindow and our parent is not mapped, we
+ // mark this window visible, so that mapping the parent later will
+ // call this function again.
+ if (win->parent() && !Fl_X::i(win->window())) {
+ win->set_visible();
+ return;
+ }
+
ulong root = win->parent() ?
fl_xid(win->window()) : RootWindow(fl_display, fl_screen);