aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/xterm.c b/src/xterm.c
index acb6566d51d..5a6d643bad4 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,6 +1,6 @@
1/* X Communication module for terminals which understand the X protocol. 1/* X Communication module for terminals which understand the X protocol.
2 2
3Copyright (C) 1989, 1993-2015 Free Software Foundation, Inc. 3Copyright (C) 1989, 1993-2016 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -569,7 +569,8 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
569 Lisp_Object acc = Qnil; 569 Lisp_Object acc = Qnil;
570 int count = SPECPDL_INDEX (); 570 int count = SPECPDL_INDEX ();
571 571
572 Fredisplay (Qt); 572 specbind (Qredisplay_dont_pause, Qt);
573 redisplay_preserve_echo_area (31);
573 574
574 f = XFRAME (XCAR (frames)); 575 f = XFRAME (XCAR (frames));
575 frames = XCDR (frames); 576 frames = XCDR (frames);
@@ -611,24 +612,18 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
611 cr = cairo_create (surface); 612 cr = cairo_create (surface);
612 cairo_surface_destroy (surface); 613 cairo_surface_destroy (surface);
613 record_unwind_protect (x_cr_destroy, make_save_ptr (cr)); 614 record_unwind_protect (x_cr_destroy, make_save_ptr (cr));
614 unblock_input ();
615 615
616 while (1) 616 while (1)
617 { 617 {
618 QUIT;
619
620 block_input ();
621 x_free_cr_resources (f); 618 x_free_cr_resources (f);
622 FRAME_CR_CONTEXT (f) = cr; 619 FRAME_CR_CONTEXT (f) = cr;
623 x_clear_area (f, 0, 0, width, height); 620 x_clear_area (f, 0, 0, width, height);
624 expose_frame (f, 0, 0, width, height); 621 expose_frame (f, 0, 0, width, height);
625 FRAME_CR_CONTEXT (f) = NULL; 622 FRAME_CR_CONTEXT (f) = NULL;
626 unblock_input ();
627 623
628 if (NILP (frames)) 624 if (NILP (frames))
629 break; 625 break;
630 626
631 block_input ();
632 cairo_surface_show_page (surface); 627 cairo_surface_show_page (surface);
633 f = XFRAME (XCAR (frames)); 628 f = XFRAME (XCAR (frames));
634 frames = XCDR (frames); 629 frames = XCDR (frames);
@@ -636,18 +631,21 @@ x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
636 height = FRAME_PIXEL_HEIGHT (f); 631 height = FRAME_PIXEL_HEIGHT (f);
637 if (surface_set_size_func) 632 if (surface_set_size_func)
638 (*surface_set_size_func) (surface, width, height); 633 (*surface_set_size_func) (surface, width, height);
634
639 unblock_input (); 635 unblock_input ();
636 QUIT;
637 block_input ();
640 } 638 }
641 639
642#ifdef CAIRO_HAS_PNG_FUNCTIONS 640#ifdef CAIRO_HAS_PNG_FUNCTIONS
643 if (surface_type == CAIRO_SURFACE_TYPE_IMAGE) 641 if (surface_type == CAIRO_SURFACE_TYPE_IMAGE)
644 { 642 {
645 block_input ();
646 cairo_surface_flush (surface); 643 cairo_surface_flush (surface);
647 cairo_surface_write_to_png_stream (surface, x_cr_accumulate_data, &acc); 644 cairo_surface_write_to_png_stream (surface, x_cr_accumulate_data, &acc);
648 unblock_input ();
649 } 645 }
650#endif 646#endif
647 unblock_input ();
648
651 unbind_to (count, Qnil); 649 unbind_to (count, Qnil);
652 650
653 return CALLN (Fapply, intern ("concat"), Fnreverse (acc)); 651 return CALLN (Fapply, intern ("concat"), Fnreverse (acc));