diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-04-04 12:01:04 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-04-04 12:01:04 +0200 |
| commit | 6763b357f4f4ef0bf6a53aa3b15eec831c22b3c3 (patch) | |
| tree | e2b2ca1aba4f85933cb26711d4d08a179bad9cf7 /src/Fl_x.cxx | |
| parent | 61de837cb0cac8764fa2d6f997357199d19f17e2 (diff) | |
Improve use of fl_create_print_window() under X11
Diffstat (limited to 'src/Fl_x.cxx')
| -rw-r--r-- | src/Fl_x.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 6b0193aff..9495ae7a6 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -530,6 +530,11 @@ void Fl_X11_Screen_Driver::disable_im() { xim_deactivate(); } +static void delayed_create_print_window(void *) { + Fl::remove_check(delayed_create_print_window); + fl_create_print_window(); +} + void Fl_X11_Screen_Driver::open_display_platform() { static Display *d = NULL; if (d) return; @@ -550,7 +555,7 @@ void Fl_X11_Screen_Driver::open_display_platform() { // the unique GC used by all X windows GC gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0); Fl_Graphics_Driver::default_driver().gc(gc); - fl_create_print_window(); + Fl::add_check(delayed_create_print_window); } |
