From 39c1386ba799d529d056f5d2789f8eb05b7534cd Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 4 Apr 2024 16:36:51 +0200 Subject: Improve use of fl_create_print_window() under Windows --- src/Fl_win32.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index ecc186d7f..2ff007c79 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -474,6 +474,10 @@ int Fl_WinAPI_System_Driver::ready() { return select(0, &fdt[0], &fdt[1], &fdt[2], &t); } +static void delayed_create_print_window(void *) { + Fl::remove_check(delayed_create_print_window); + fl_create_print_window(); +} void Fl_WinAPI_Screen_Driver::open_display_platform() { static char beenHereDoneThat = 0; @@ -517,7 +521,7 @@ void Fl_WinAPI_Screen_Driver::open_display_platform() { } OleInitialize(0L); get_imm_module(); - fl_create_print_window(); + Fl::add_check(delayed_create_print_window); } -- cgit v1.2.3