From 44bb080c0ff81b16d48dccd8d15809f058cc68ea Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 17 Nov 2023 16:55:37 +0100 Subject: Remove friend declaration from Fl_Window.H (see STR 3354) Although this was not strictly necessary I decided to implement the proposed patch, but in a slightly different way. This adds a static public method for internal use only but it wouldn't do any harm if a user called it. --- FL/Fl_Window.H | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index 0c8d11484..adf0aa44c 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -1,7 +1,7 @@ // // Window header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2022 by Bill Spitzak and others. +// Copyright 1998-2023 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -53,12 +53,11 @@ class Fl_Double_Window; flags are ignored. */ class FL_EXPORT Fl_Window : public Fl_Group { - friend int Fl::arg(int argc, char **argv, int &i); friend class Fl_X; friend class Fl_Window_Driver; private: static char *default_xclass_; - static char show_iconic_; // 1 means create next window in iconic form + static char show_next_window_iconic_; // 1 means create next window in iconic form int no_fullscreen_x; int no_fullscreen_y; @@ -602,6 +601,28 @@ public: void screen_num(int screen_num); static bool is_a_rescale(); fl_uintptr_t os_id(); + + /** + Sets a static flag whether the next window should be opened iconified. + + \note This is an internal function, you should not use this in user code. + + Please use Fl_Window::iconize() instead. + */ + static void show_next_window_iconic(char stat) { + show_next_window_iconic_ = stat ? 1 : 0; + } + + /** + Returns the static flag whether the next window should be opened iconified. + + \note This is an internal function, you should not use this in user code. + + Please use Fl_Window::iconize() to iconify a window. + */ + static char show_next_window_iconic() { + return show_next_window_iconic_; + } }; #endif -- cgit v1.2.3