Author: matt
Date: 2007-06-18 09:08:57 -0400 (Mon, 18 Jun 2007)
New Revision: 5914
Log:
#1706: on WIN32, the attempt to map a subwindow when the parent window was not
mapped yet would result in the subwindow never being mapped. This change will
defer mapping until the parent window is shown.
Modified:
branches/branch-1.1/src/Fl_win32.cxx
branches/branch-1.1/src/Fl_x.cxx
Modified: branches/branch-1.1/src/Fl_win32.cxx
===================================================================
--- branches/branch-1.1/src/Fl_win32.cxx 2007-06-18 13:03:39 UTC (rev
5913)
+++ branches/branch-1.1/src/Fl_win32.cxx 2007-06-18 13:08:57 UTC (rev
5914)
@@ -1188,6 +1188,14 @@
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();
Modified: branches/branch-1.1/src/Fl_x.cxx
===================================================================
--- branches/branch-1.1/src/Fl_x.cxx 2007-06-18 13:03:39 UTC (rev 5913)
+++ branches/branch-1.1/src/Fl_x.cxx 2007-06-18 13:08:57 UTC (rev 5914)
@@ -1134,9 +1134,9 @@
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;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit