summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-02-07 15:23:50 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-02-07 15:23:50 +0100
commitd068fbf9dee73c86773250d143e97d60b91929d3 (patch)
treea55ae2e0781dae59df5349650a9786162c0ff83a /src
parent7cb0c2311cf014df7d640b250a0b177b26dc2a00 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Window.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index 27ff2ae9d..0b4961062 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -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();
}