Fix state of visible() flag after Fl_Window(x, y, w, h, t).

The doc states:
"Top-level windows initially have visible() set to 0 and parent() set to NULL.
Subwindows initially have visible() set to 1 and parent() set to the parent window pointer."
The first statement was not satisfied when a window was constructed
with the Fl_Window(x, y, w, h, t) constructor.
This commit is contained in:
ManoloFLTK 2020-02-07 15:23:50 +01:00
parent 7cb0c2311c
commit d068fbf9de

View File

@ -74,6 +74,7 @@ Fl_Window::Fl_Window(int X,int Y,int W, int H, const char *l) :
{
_Fl_Window();
set_flag(FORCE_POSITION);
if (!parent()) clear_visible();
}