From d068fbf9dee73c86773250d143e97d60b91929d3 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 7 Feb 2020 15:23:50 +0100 Subject: 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. --- src/Fl_Window.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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(); } -- cgit v1.2.3