|
|
commit 6763b357f4f4ef0bf6a53aa3b15eec831c22b3c3
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Apr 4 12:01:04 2024 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu Apr 4 12:01:04 2024 +0200
Improve use of fl_create_print_window() under X11
src/Fl_x.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git src/Fl_x.cxx src/Fl_x.cxx
index 6b0193a..9495ae7 100644
--- src/Fl_x.cxx
+++ 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);
}
[ Direct Link to Message ] | |
|
| |