Skip to content

Commit

Permalink
Disable asynchronous mode for GTK printing (#336).
Browse files Browse the repository at this point in the history
Fix issue #336: for unknown reasons, asynchronous printing in GTK3 generates
blank pages.  Disabling asynchronous mode fixes this problem.  This change makes
the main window freeze when the print dialog is popped up.  But it shouldn't be
a problem.  First this is also the default behavior when the print dialog is
popped up in Windows.  This change makes the behavior more consistent on
different OSes.  Besides, it is reasonable to forbid editing when the contents
of the editor is being printed.
  • Loading branch information
chihyang authored and mflatt committed Sep 19, 2024
1 parent 03b7ffa commit 619bcd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui-lib/mred/private/wx/gtk/printer-dc.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
(connect-end-print op-gtk)

(gtk_print_operation_set_n_pages op-gtk (length pages))
(gtk_print_operation_set_allow_async op-gtk #t)
(gtk_print_operation_set_allow_async op-gtk #f)
(gtk_print_operation_set_default_page_setup op-gtk page-setup)

(define done-sema (make-semaphore))
Expand Down

0 comments on commit 619bcd4

Please sign in to comment.