From f91c9dd2b4e8156217b20f8658a2862e1009a27f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 29 Apr 2022 11:52:22 +0800 Subject: [PATCH] Remove some unneeded tests from the X double buffering code * src/xterm.c (x_flip_and_flush): Fix coding style. (flush_dirty_back_buffer_on): Avoid testing for impossible situations. --- src/xterm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 98641d0241d..cce586952af 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5468,7 +5468,7 @@ x_flip_and_flush (struct frame *f) { block_input (); if (FRAME_X_NEED_BUFFER_FLIP (f)) - show_back_buffer (f); + show_back_buffer (f); x_flush (f); unblock_input (); } @@ -13673,12 +13673,9 @@ static void flush_dirty_back_buffer_on (struct frame *f) { block_input (); - if (FRAME_LIVE_P (f) && - FRAME_X_P (f) && - FRAME_X_WINDOW (f) && - !FRAME_GARBAGED_P (f) && - !buffer_flipping_blocked_p () && - FRAME_X_NEED_BUFFER_FLIP (f)) + if (!FRAME_GARBAGED_P (f) + && !buffer_flipping_blocked_p () + && FRAME_X_NEED_BUFFER_FLIP (f)) show_back_buffer (f); unblock_input (); } -- 2.39.2