summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_win32.cxx8
-rw-r--r--src/Fl_x.cxx6
2 files changed, 11 insertions, 3 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 607b8b750..a330b4dd0 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1188,6 +1188,14 @@ int fl_disable_transient_for; // secret method of removing TRANSIENT_FOR
Fl_X* Fl_X::make(Fl_Window* w) {
Fl_Group::current(0); // get rid of very common user bug: forgot end()
+ // if the window is a subwindow and our parent is not mapped yet, we
+ // mark this window visible, so that mapping the parent at a later
+ // point in time will call this function again to finally map the subwindow.
+ if (w->parent() && !Fl_X::i(w->window())) {
+ w->set_visible();
+ return 0L;
+ }
+
static NameList class_name_list;
static const char *first_class_name = 0L;
const char *class_name = w->xclass();
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 5603b22c8..7121cc8d9 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1134,9 +1134,9 @@ 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 the window is a subwindow and our parent is not mapped yet, we
+ // mark this window visible, so that mapping the parent at a later
+ // point in time will call this function again to finally map the subwindow.
if (win->parent() && !Fl_X::i(win->window())) {
win->set_visible();
return;