summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-04 16:36:51 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-04 16:36:51 +0200
commit39c1386ba799d529d056f5d2789f8eb05b7534cd (patch)
treee625ead58041046072a3a4060a5f6727c7b3d485
parent6763b357f4f4ef0bf6a53aa3b15eec831c22b3c3 (diff)
Improve use of fl_create_print_window() under Windows
-rw-r--r--src/Fl_win32.cxx6
1 files changed, 5 insertions, 1 deletions
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);
}