diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 39 | ||||
| -rw-r--r-- | src/xftfont.c | 63 | ||||
| -rw-r--r-- | src/xterm.c | 54 | ||||
| -rw-r--r-- | src/xterm.h | 4 |
4 files changed, 109 insertions, 51 deletions
diff --git a/src/xfns.c b/src/xfns.c index 7176d626094..14721c6ce83 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -823,22 +823,24 @@ x_set_tool_bar_position (struct frame *f, | |||
| 823 | wrong_choice (choice, new_value); | 823 | wrong_choice (choice, new_value); |
| 824 | } | 824 | } |
| 825 | 825 | ||
| 826 | #ifdef HAVE_XDBE | ||
| 826 | static void | 827 | static void |
| 827 | x_set_inhibit_double_buffering (struct frame *f, | 828 | x_set_inhibit_double_buffering (struct frame *f, |
| 828 | Lisp_Object new_value, | 829 | Lisp_Object new_value, |
| 829 | Lisp_Object old_value) | 830 | Lisp_Object old_value) |
| 830 | { | 831 | { |
| 831 | block_input (); | 832 | bool want_double_buffering, was_double_buffered; |
| 833 | |||
| 832 | if (FRAME_X_WINDOW (f) && !EQ (new_value, old_value)) | 834 | if (FRAME_X_WINDOW (f) && !EQ (new_value, old_value)) |
| 833 | { | 835 | { |
| 834 | bool want_double_buffering = NILP (new_value); | 836 | want_double_buffering = NILP (new_value); |
| 835 | bool was_double_buffered = FRAME_X_DOUBLE_BUFFERED_P (f); | 837 | was_double_buffered = FRAME_X_DOUBLE_BUFFERED_P (f); |
| 836 | /* font_drop_xrender_surfaces in xftfont does something only if | 838 | |
| 837 | we're double-buffered, so call font_drop_xrender_surfaces before | 839 | block_input (); |
| 838 | and after any potential change. One of the calls will end up | ||
| 839 | being a no-op. */ | ||
| 840 | if (want_double_buffering != was_double_buffered) | 840 | if (want_double_buffering != was_double_buffered) |
| 841 | { | 841 | { |
| 842 | /* Force XftDraw etc to be recreated with the new double | ||
| 843 | buffered drawable. */ | ||
| 842 | font_drop_xrender_surfaces (f); | 844 | font_drop_xrender_surfaces (f); |
| 843 | 845 | ||
| 844 | /* Scroll bars decide whether or not to use a back buffer | 846 | /* Scroll bars decide whether or not to use a back buffer |
| @@ -860,9 +862,10 @@ x_set_inhibit_double_buffering (struct frame *f, | |||
| 860 | SET_FRAME_GARBAGED (f); | 862 | SET_FRAME_GARBAGED (f); |
| 861 | font_drop_xrender_surfaces (f); | 863 | font_drop_xrender_surfaces (f); |
| 862 | } | 864 | } |
| 865 | unblock_input (); | ||
| 863 | } | 866 | } |
| 864 | unblock_input (); | ||
| 865 | } | 867 | } |
| 868 | #endif | ||
| 866 | 869 | ||
| 867 | /** | 870 | /** |
| 868 | * x_set_undecorated: | 871 | * x_set_undecorated: |
| @@ -3548,8 +3551,11 @@ xic_set_xfontset (struct frame *f, const char *base_fontname) | |||
| 3548 | void | 3551 | void |
| 3549 | x_mark_frame_dirty (struct frame *f) | 3552 | x_mark_frame_dirty (struct frame *f) |
| 3550 | { | 3553 | { |
| 3551 | if (FRAME_X_DOUBLE_BUFFERED_P (f) && !FRAME_X_NEED_BUFFER_FLIP (f)) | 3554 | #ifdef HAVE_XDBE |
| 3555 | if (FRAME_X_DOUBLE_BUFFERED_P (f) | ||
| 3556 | && !FRAME_X_NEED_BUFFER_FLIP (f)) | ||
| 3552 | FRAME_X_NEED_BUFFER_FLIP (f) = true; | 3557 | FRAME_X_NEED_BUFFER_FLIP (f) = true; |
| 3558 | #endif | ||
| 3553 | } | 3559 | } |
| 3554 | 3560 | ||
| 3555 | static void | 3561 | static void |
| @@ -3630,12 +3636,12 @@ tear_down_x_back_buffer (struct frame *f) | |||
| 3630 | void | 3636 | void |
| 3631 | initial_set_up_x_back_buffer (struct frame *f) | 3637 | initial_set_up_x_back_buffer (struct frame *f) |
| 3632 | { | 3638 | { |
| 3633 | block_input (); | ||
| 3634 | eassert (FRAME_X_WINDOW (f)); | 3639 | eassert (FRAME_X_WINDOW (f)); |
| 3635 | FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f); | 3640 | FRAME_X_RAW_DRAWABLE (f) = FRAME_X_WINDOW (f); |
| 3636 | if (NILP (CDR (Fassq (Qinhibit_double_buffering, f->param_alist)))) | 3641 | |
| 3642 | if (NILP (CDR (Fassq (Qinhibit_double_buffering, | ||
| 3643 | f->param_alist)))) | ||
| 3637 | set_up_x_back_buffer (f); | 3644 | set_up_x_back_buffer (f); |
| 3638 | unblock_input (); | ||
| 3639 | } | 3645 | } |
| 3640 | 3646 | ||
| 3641 | #if defined HAVE_XINPUT2 | 3647 | #if defined HAVE_XINPUT2 |
| @@ -8614,7 +8620,12 @@ DEFUN ("x-double-buffered-p", Fx_double_buffered_p, Sx_double_buffered_p, | |||
| 8614 | (Lisp_Object frame) | 8620 | (Lisp_Object frame) |
| 8615 | { | 8621 | { |
| 8616 | struct frame *f = decode_live_frame (frame); | 8622 | struct frame *f = decode_live_frame (frame); |
| 8623 | |||
| 8624 | #ifdef HAVE_XDBE | ||
| 8617 | return FRAME_X_DOUBLE_BUFFERED_P (f) ? Qt : Qnil; | 8625 | return FRAME_X_DOUBLE_BUFFERED_P (f) ? Qt : Qnil; |
| 8626 | #else | ||
| 8627 | return Qnil; | ||
| 8628 | #endif | ||
| 8618 | } | 8629 | } |
| 8619 | 8630 | ||
| 8620 | 8631 | ||
| @@ -9360,7 +9371,11 @@ frame_parm_handler x_frame_parm_handlers[] = | |||
| 9360 | gui_set_alpha, | 9371 | gui_set_alpha, |
| 9361 | x_set_sticky, | 9372 | x_set_sticky, |
| 9362 | x_set_tool_bar_position, | 9373 | x_set_tool_bar_position, |
| 9374 | #ifdef HAVE_XDBE | ||
| 9363 | x_set_inhibit_double_buffering, | 9375 | x_set_inhibit_double_buffering, |
| 9376 | #else | ||
| 9377 | NULL, | ||
| 9378 | #endif | ||
| 9364 | x_set_undecorated, | 9379 | x_set_undecorated, |
| 9365 | x_set_parent_frame, | 9380 | x_set_parent_frame, |
| 9366 | x_set_skip_taskbar, | 9381 | x_set_skip_taskbar, |
diff --git a/src/xftfont.c b/src/xftfont.c index e27c6cf3146..31fb877c35b 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -643,18 +643,23 @@ xftfont_end_for_frame (struct frame *f) | |||
| 643 | return 0; | 643 | return 0; |
| 644 | } | 644 | } |
| 645 | 645 | ||
| 646 | /* When using X double buffering, the XftDraw structure we build | 646 | /* When using X double buffering, the XRender surfaces we create seem |
| 647 | seems to be useless once a frame is resized, so recreate it on | 647 | to become useless once the window acting as the front buffer is |
| 648 | resized for an unknown reason (X server bug?), so recreate it on | ||
| 648 | ConfigureNotify and in some other cases. */ | 649 | ConfigureNotify and in some other cases. */ |
| 649 | 650 | ||
| 651 | #ifdef HAVE_XDBE | ||
| 650 | static void | 652 | static void |
| 651 | xftfont_drop_xrender_surfaces (struct frame *f) | 653 | xftfont_drop_xrender_surfaces (struct frame *f) |
| 652 | { | 654 | { |
| 653 | block_input (); | ||
| 654 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) | 655 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) |
| 655 | xftfont_end_for_frame (f); | 656 | { |
| 656 | unblock_input (); | 657 | block_input (); |
| 658 | xftfont_end_for_frame (f); | ||
| 659 | unblock_input (); | ||
| 660 | } | ||
| 657 | } | 661 | } |
| 662 | #endif | ||
| 658 | 663 | ||
| 659 | static bool | 664 | static bool |
| 660 | xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, | 665 | xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, |
| @@ -741,35 +746,37 @@ static void syms_of_xftfont_for_pdumper (void); | |||
| 741 | struct font_driver const xftfont_driver = | 746 | struct font_driver const xftfont_driver = |
| 742 | { | 747 | { |
| 743 | /* We can't draw a text without device dependent functions. */ | 748 | /* We can't draw a text without device dependent functions. */ |
| 744 | .type = LISPSYM_INITIALLY (Qxft), | 749 | .type = LISPSYM_INITIALLY (Qxft), |
| 745 | .get_cache = xfont_get_cache, | 750 | .get_cache = xfont_get_cache, |
| 746 | .list = xftfont_list, | 751 | .list = xftfont_list, |
| 747 | .match = xftfont_match, | 752 | .match = xftfont_match, |
| 748 | .list_family = ftfont_list_family, | 753 | .list_family = ftfont_list_family, |
| 749 | .open_font = xftfont_open, | 754 | .open_font = xftfont_open, |
| 750 | .close_font = xftfont_close, | 755 | .close_font = xftfont_close, |
| 751 | .prepare_face = xftfont_prepare_face, | 756 | .prepare_face = xftfont_prepare_face, |
| 752 | .done_face = xftfont_done_face, | 757 | .done_face = xftfont_done_face, |
| 753 | .has_char = xftfont_has_char, | 758 | .has_char = xftfont_has_char, |
| 754 | .encode_char = xftfont_encode_char, | 759 | .encode_char = xftfont_encode_char, |
| 755 | .text_extents = xftfont_text_extents, | 760 | .text_extents = xftfont_text_extents, |
| 756 | .draw = xftfont_draw, | 761 | .draw = xftfont_draw, |
| 757 | .get_bitmap = ftfont_get_bitmap, | 762 | .get_bitmap = ftfont_get_bitmap, |
| 758 | .anchor_point = ftfont_anchor_point, | 763 | .anchor_point = ftfont_anchor_point, |
| 759 | #ifdef HAVE_LIBOTF | 764 | #ifdef HAVE_LIBOTF |
| 760 | .otf_capability = ftfont_otf_capability, | 765 | .otf_capability = ftfont_otf_capability, |
| 761 | #endif | 766 | #endif |
| 762 | .end_for_frame = xftfont_end_for_frame, | 767 | .end_for_frame = xftfont_end_for_frame, |
| 763 | #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF | 768 | #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF |
| 764 | .shape = xftfont_shape, | 769 | .shape = xftfont_shape, |
| 765 | #endif | 770 | #endif |
| 766 | #if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX | 771 | #if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX |
| 767 | .get_variation_glyphs = ftfont_variation_glyphs, | 772 | .get_variation_glyphs = ftfont_variation_glyphs, |
| 773 | #endif | ||
| 774 | .filter_properties = ftfont_filter_properties, | ||
| 775 | .cached_font_ok = xftfont_cached_font_ok, | ||
| 776 | .combining_capability = ftfont_combining_capability, | ||
| 777 | #ifdef HAVE_XDBE | ||
| 778 | .drop_xrender_surfaces = xftfont_drop_xrender_surfaces, | ||
| 768 | #endif | 779 | #endif |
| 769 | .filter_properties = ftfont_filter_properties, | ||
| 770 | .cached_font_ok = xftfont_cached_font_ok, | ||
| 771 | .combining_capability = ftfont_combining_capability, | ||
| 772 | .drop_xrender_surfaces = xftfont_drop_xrender_surfaces, | ||
| 773 | }; | 780 | }; |
| 774 | #ifdef HAVE_HARFBUZZ | 781 | #ifdef HAVE_HARFBUZZ |
| 775 | struct font_driver xfthbfont_driver; | 782 | struct font_driver xfthbfont_driver; |
diff --git a/src/xterm.c b/src/xterm.c index 517869dde34..adfe90522d4 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3780,6 +3780,7 @@ x_flush (struct frame *f) | |||
| 3780 | unblock_input (); | 3780 | unblock_input (); |
| 3781 | } | 3781 | } |
| 3782 | 3782 | ||
| 3783 | #ifdef HAVE_XDBE | ||
| 3783 | static void | 3784 | static void |
| 3784 | x_drop_xrender_surfaces (struct frame *f) | 3785 | x_drop_xrender_surfaces (struct frame *f) |
| 3785 | { | 3786 | { |
| @@ -3795,6 +3796,7 @@ x_drop_xrender_surfaces (struct frame *f) | |||
| 3795 | } | 3796 | } |
| 3796 | #endif | 3797 | #endif |
| 3797 | } | 3798 | } |
| 3799 | #endif | ||
| 3798 | 3800 | ||
| 3799 | #ifdef HAVE_XRENDER | 3801 | #ifdef HAVE_XRENDER |
| 3800 | void | 3802 | void |
| @@ -5127,9 +5129,14 @@ x_clear_window (struct frame *f) | |||
| 5127 | x_end_cr_clip (f); | 5129 | x_end_cr_clip (f); |
| 5128 | #else | 5130 | #else |
| 5129 | #ifndef USE_GTK | 5131 | #ifndef USE_GTK |
| 5130 | if (FRAME_X_DOUBLE_BUFFERED_P (f) || (f->alpha_background != 1.0)) | 5132 | if (f->alpha_background != 1.0 |
| 5133 | #ifdef HAVE_XDBE | ||
| 5134 | || FRAME_X_DOUBLE_BUFFERED_P (f) | ||
| 5131 | #endif | 5135 | #endif |
| 5132 | x_clear_area (f, 0, 0, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); | 5136 | ) |
| 5137 | #endif | ||
| 5138 | x_clear_area (f, 0, 0, FRAME_PIXEL_WIDTH (f), | ||
| 5139 | FRAME_PIXEL_HEIGHT (f)); | ||
| 5133 | #ifndef USE_GTK | 5140 | #ifndef USE_GTK |
| 5134 | else | 5141 | else |
| 5135 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); | 5142 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); |
| @@ -5456,13 +5463,15 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) | |||
| 5456 | /* Show the frame back buffer. If frame is double-buffered, | 5463 | /* Show the frame back buffer. If frame is double-buffered, |
| 5457 | atomically publish to the user's screen graphics updates made since | 5464 | atomically publish to the user's screen graphics updates made since |
| 5458 | the last call to show_back_buffer. */ | 5465 | the last call to show_back_buffer. */ |
| 5466 | |||
| 5467 | #ifdef HAVE_XDBE | ||
| 5459 | static void | 5468 | static void |
| 5460 | show_back_buffer (struct frame *f) | 5469 | show_back_buffer (struct frame *f) |
| 5461 | { | 5470 | { |
| 5462 | block_input (); | 5471 | block_input (); |
| 5472 | |||
| 5463 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) | 5473 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) |
| 5464 | { | 5474 | { |
| 5465 | #ifdef HAVE_XDBE | ||
| 5466 | #ifdef USE_CAIRO | 5475 | #ifdef USE_CAIRO |
| 5467 | cairo_t *cr = FRAME_CR_CONTEXT (f); | 5476 | cairo_t *cr = FRAME_CR_CONTEXT (f); |
| 5468 | if (cr) | 5477 | if (cr) |
| @@ -5473,13 +5482,12 @@ show_back_buffer (struct frame *f) | |||
| 5473 | swap_info.swap_window = FRAME_X_WINDOW (f); | 5482 | swap_info.swap_window = FRAME_X_WINDOW (f); |
| 5474 | swap_info.swap_action = XdbeCopied; | 5483 | swap_info.swap_action = XdbeCopied; |
| 5475 | XdbeSwapBuffers (FRAME_X_DISPLAY (f), &swap_info, 1); | 5484 | XdbeSwapBuffers (FRAME_X_DISPLAY (f), &swap_info, 1); |
| 5476 | #else | ||
| 5477 | eassert (!"should have back-buffer only with XDBE"); | ||
| 5478 | #endif | ||
| 5479 | } | 5485 | } |
| 5480 | FRAME_X_NEED_BUFFER_FLIP (f) = false; | 5486 | FRAME_X_NEED_BUFFER_FLIP (f) = false; |
| 5487 | |||
| 5481 | unblock_input (); | 5488 | unblock_input (); |
| 5482 | } | 5489 | } |
| 5490 | #endif | ||
| 5483 | 5491 | ||
| 5484 | /* Updates back buffer and flushes changes to display. Called from | 5492 | /* Updates back buffer and flushes changes to display. Called from |
| 5485 | minibuf read code. Note that we display the back buffer even if | 5493 | minibuf read code. Note that we display the back buffer even if |
| @@ -5488,8 +5496,10 @@ static void | |||
| 5488 | x_flip_and_flush (struct frame *f) | 5496 | x_flip_and_flush (struct frame *f) |
| 5489 | { | 5497 | { |
| 5490 | block_input (); | 5498 | block_input (); |
| 5499 | #ifdef HAVE_XDBE | ||
| 5491 | if (FRAME_X_NEED_BUFFER_FLIP (f)) | 5500 | if (FRAME_X_NEED_BUFFER_FLIP (f)) |
| 5492 | show_back_buffer (f); | 5501 | show_back_buffer (f); |
| 5502 | #endif | ||
| 5493 | x_flush (f); | 5503 | x_flush (f); |
| 5494 | unblock_input (); | 5504 | unblock_input (); |
| 5495 | } | 5505 | } |
| @@ -5538,8 +5548,12 @@ XTframe_up_to_date (struct frame *f) | |||
| 5538 | eassert (FRAME_X_P (f)); | 5548 | eassert (FRAME_X_P (f)); |
| 5539 | block_input (); | 5549 | block_input (); |
| 5540 | FRAME_MOUSE_UPDATE (f); | 5550 | FRAME_MOUSE_UPDATE (f); |
| 5541 | if (!buffer_flipping_blocked_p () && FRAME_X_NEED_BUFFER_FLIP (f)) | 5551 | |
| 5552 | #ifdef HAVE_XDBE | ||
| 5553 | if (!buffer_flipping_blocked_p () | ||
| 5554 | && FRAME_X_NEED_BUFFER_FLIP (f)) | ||
| 5542 | show_back_buffer (f); | 5555 | show_back_buffer (f); |
| 5556 | #endif | ||
| 5543 | 5557 | ||
| 5544 | #ifdef HAVE_XSYNC | 5558 | #ifdef HAVE_XSYNC |
| 5545 | #ifndef HAVE_GTK3 | 5559 | #ifndef HAVE_GTK3 |
| @@ -5592,12 +5606,14 @@ XTframe_up_to_date (struct frame *f) | |||
| 5592 | unblock_input (); | 5606 | unblock_input (); |
| 5593 | } | 5607 | } |
| 5594 | 5608 | ||
| 5609 | #ifdef HAVE_XDBE | ||
| 5595 | static void | 5610 | static void |
| 5596 | XTbuffer_flipping_unblocked_hook (struct frame *f) | 5611 | XTbuffer_flipping_unblocked_hook (struct frame *f) |
| 5597 | { | 5612 | { |
| 5598 | if (FRAME_X_NEED_BUFFER_FLIP (f)) | 5613 | if (FRAME_X_NEED_BUFFER_FLIP (f)) |
| 5599 | show_back_buffer (f); | 5614 | show_back_buffer (f); |
| 5600 | } | 5615 | } |
| 5616 | #endif | ||
| 5601 | 5617 | ||
| 5602 | /** | 5618 | /** |
| 5603 | * x_clear_under_internal_border: | 5619 | * x_clear_under_internal_border: |
| @@ -8716,8 +8732,11 @@ x_clear_area (struct frame *f, int x, int y, int width, int height) | |||
| 8716 | x_end_cr_clip (f); | 8732 | x_end_cr_clip (f); |
| 8717 | #else | 8733 | #else |
| 8718 | #ifndef USE_GTK | 8734 | #ifndef USE_GTK |
| 8719 | if (FRAME_X_DOUBLE_BUFFERED_P (f) | 8735 | if (f->alpha_background != 1.0 |
| 8720 | || f->alpha_background != 1.0) | 8736 | #ifdef HAVE_XDBE |
| 8737 | || FRAME_X_DOUBLE_BUFFERED_P (f) | ||
| 8738 | #endif | ||
| 8739 | ) | ||
| 8721 | #endif | 8740 | #endif |
| 8722 | { | 8741 | { |
| 8723 | #if defined HAVE_XRENDER && \ | 8742 | #if defined HAVE_XRENDER && \ |
| @@ -13738,7 +13757,9 @@ x_net_wm_state (struct frame *f, Window window) | |||
| 13738 | store_frame_param (f, Qshaded, shaded ? Qt : Qnil); | 13757 | store_frame_param (f, Qshaded, shaded ? Qt : Qnil); |
| 13739 | } | 13758 | } |
| 13740 | 13759 | ||
| 13741 | /* Flip back buffers on FRAME if it has undrawn content. */ | 13760 | /* Flip back buffers on F if it has undrawn content. */ |
| 13761 | |||
| 13762 | #ifdef HAVE_XDBE | ||
| 13742 | static void | 13763 | static void |
| 13743 | flush_dirty_back_buffer_on (struct frame *f) | 13764 | flush_dirty_back_buffer_on (struct frame *f) |
| 13744 | { | 13765 | { |
| @@ -13749,6 +13770,7 @@ flush_dirty_back_buffer_on (struct frame *f) | |||
| 13749 | show_back_buffer (f); | 13770 | show_back_buffer (f); |
| 13750 | unblock_input (); | 13771 | unblock_input (); |
| 13751 | } | 13772 | } |
| 13773 | #endif | ||
| 13752 | 13774 | ||
| 13753 | #ifdef HAVE_GTK3 | 13775 | #ifdef HAVE_GTK3 |
| 13754 | void | 13776 | void |
| @@ -14707,8 +14729,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 14707 | SET_FRAME_ICONIFIED (f, false); | 14729 | SET_FRAME_ICONIFIED (f, false); |
| 14708 | } | 14730 | } |
| 14709 | 14731 | ||
| 14732 | #ifdef HAVE_XDBE | ||
| 14710 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) | 14733 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) |
| 14711 | x_drop_xrender_surfaces (f); | 14734 | x_drop_xrender_surfaces (f); |
| 14735 | #endif | ||
| 14712 | f->output_data.x->has_been_visible = true; | 14736 | f->output_data.x->has_been_visible = true; |
| 14713 | SET_FRAME_GARBAGED (f); | 14737 | SET_FRAME_GARBAGED (f); |
| 14714 | unblock_input (); | 14738 | unblock_input (); |
| @@ -14753,8 +14777,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 14753 | #endif | 14777 | #endif |
| 14754 | } | 14778 | } |
| 14755 | 14779 | ||
| 14780 | #ifdef HAVE_XDBE | ||
| 14756 | if (!FRAME_GARBAGED_P (f)) | 14781 | if (!FRAME_GARBAGED_P (f)) |
| 14757 | show_back_buffer (f); | 14782 | show_back_buffer (f); |
| 14783 | #endif | ||
| 14758 | } | 14784 | } |
| 14759 | else | 14785 | else |
| 14760 | { | 14786 | { |
| @@ -14802,7 +14828,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 14802 | #ifdef USE_GTK | 14828 | #ifdef USE_GTK |
| 14803 | x_clear_under_internal_border (f); | 14829 | x_clear_under_internal_border (f); |
| 14804 | #endif | 14830 | #endif |
| 14831 | #ifdef HAVE_XDBE | ||
| 14805 | show_back_buffer (f); | 14832 | show_back_buffer (f); |
| 14833 | #endif | ||
| 14806 | } | 14834 | } |
| 14807 | #ifdef USE_X_TOOLKIT | 14835 | #ifdef USE_X_TOOLKIT |
| 14808 | else | 14836 | else |
| @@ -16016,8 +16044,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 16016 | for size changes: that's not sufficient. We miss some | 16044 | for size changes: that's not sufficient. We miss some |
| 16017 | surface invalidations and flicker. */ | 16045 | surface invalidations and flicker. */ |
| 16018 | block_input (); | 16046 | block_input (); |
| 16047 | #ifdef HAVE_XDBE | ||
| 16019 | if (f && FRAME_X_DOUBLE_BUFFERED_P (f)) | 16048 | if (f && FRAME_X_DOUBLE_BUFFERED_P (f)) |
| 16020 | x_drop_xrender_surfaces (f); | 16049 | x_drop_xrender_surfaces (f); |
| 16050 | #endif | ||
| 16021 | unblock_input (); | 16051 | unblock_input (); |
| 16022 | #if defined USE_CAIRO && !defined USE_GTK | 16052 | #if defined USE_CAIRO && !defined USE_GTK |
| 16023 | if (f) | 16053 | if (f) |
| @@ -19447,11 +19477,13 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 19447 | redisplay. To ensure that these changes become visible, draw | 19477 | redisplay. To ensure that these changes become visible, draw |
| 19448 | them here. */ | 19478 | them here. */ |
| 19449 | 19479 | ||
| 19480 | #ifdef HAVE_XDBE | ||
| 19450 | if (f) | 19481 | if (f) |
| 19451 | flush_dirty_back_buffer_on (f); | 19482 | flush_dirty_back_buffer_on (f); |
| 19452 | 19483 | ||
| 19453 | if (any && any != f) | 19484 | if (any && any != f) |
| 19454 | flush_dirty_back_buffer_on (any); | 19485 | flush_dirty_back_buffer_on (any); |
| 19486 | #endif | ||
| 19455 | return count; | 19487 | return count; |
| 19456 | } | 19488 | } |
| 19457 | 19489 | ||
| @@ -24309,7 +24341,9 @@ x_create_terminal (struct x_display_info *dpyinfo) | |||
| 24309 | terminal->update_end_hook = x_update_end; | 24341 | terminal->update_end_hook = x_update_end; |
| 24310 | terminal->read_socket_hook = XTread_socket; | 24342 | terminal->read_socket_hook = XTread_socket; |
| 24311 | terminal->frame_up_to_date_hook = XTframe_up_to_date; | 24343 | terminal->frame_up_to_date_hook = XTframe_up_to_date; |
| 24344 | #ifdef HAVE_XDBE | ||
| 24312 | terminal->buffer_flipping_unblocked_hook = XTbuffer_flipping_unblocked_hook; | 24345 | terminal->buffer_flipping_unblocked_hook = XTbuffer_flipping_unblocked_hook; |
| 24346 | #endif | ||
| 24313 | terminal->defined_color_hook = x_defined_color; | 24347 | terminal->defined_color_hook = x_defined_color; |
| 24314 | terminal->query_frame_background_color = x_query_frame_background_color; | 24348 | terminal->query_frame_background_color = x_query_frame_background_color; |
| 24315 | terminal->query_colors = x_query_colors; | 24349 | terminal->query_colors = x_query_colors; |
diff --git a/src/xterm.h b/src/xterm.h index 65349834c9b..80b57137981 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1025,13 +1025,15 @@ extern void x_mark_frame_dirty (struct frame *f); | |||
| 1025 | code after any drawing command, but we can run code whenever | 1025 | code after any drawing command, but we can run code whenever |
| 1026 | someone asks for the handle necessary to draw. */ | 1026 | someone asks for the handle necessary to draw. */ |
| 1027 | #define FRAME_X_DRAWABLE(f) \ | 1027 | #define FRAME_X_DRAWABLE(f) \ |
| 1028 | (x_mark_frame_dirty((f)), FRAME_X_RAW_DRAWABLE ((f))) | 1028 | (x_mark_frame_dirty ((f)), FRAME_X_RAW_DRAWABLE ((f))) |
| 1029 | 1029 | ||
| 1030 | #ifdef HAVE_XDBE | ||
| 1030 | #define FRAME_X_DOUBLE_BUFFERED_P(f) \ | 1031 | #define FRAME_X_DOUBLE_BUFFERED_P(f) \ |
| 1031 | (FRAME_X_WINDOW (f) != FRAME_X_RAW_DRAWABLE (f)) | 1032 | (FRAME_X_WINDOW (f) != FRAME_X_RAW_DRAWABLE (f)) |
| 1032 | 1033 | ||
| 1033 | /* Return the need-buffer-flip flag for frame F. */ | 1034 | /* Return the need-buffer-flip flag for frame F. */ |
| 1034 | #define FRAME_X_NEED_BUFFER_FLIP(f) ((f)->output_data.x->need_buffer_flip) | 1035 | #define FRAME_X_NEED_BUFFER_FLIP(f) ((f)->output_data.x->need_buffer_flip) |
| 1036 | #endif | ||
| 1035 | 1037 | ||
| 1036 | /* Return the outermost X window associated with the frame F. */ | 1038 | /* Return the outermost X window associated with the frame F. */ |
| 1037 | #ifdef USE_X_TOOLKIT | 1039 | #ifdef USE_X_TOOLKIT |