From ff36bc1a085c6caca3bdb95791c5001c3c6909bb Mon Sep 17 00:00:00 2001 From: totaam Date: Fri, 10 Nov 2023 22:20:38 +0700 Subject: [PATCH] send a flush value not setting it in client_options could result in the previous value being used --- xpra/server/window/window_source.py | 3 +-- xpra/server/window/window_video_source.py | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/xpra/server/window/window_source.py b/xpra/server/window/window_source.py index e0af05e9cb..a91468d762 100644 --- a/xpra/server/window/window_source.py +++ b/xpra/server/window/window_source.py @@ -2723,8 +2723,7 @@ def nodata(msg, *args) -> None: if mod: client_options["encoder"] = mod #actual network packet: - if flush not in (None, 0): - client_options["flush"] = flush + client_options["flush"] = flush or 0 if self.send_timetamps: client_options["ts"] = image.get_timestamp() end = monotonic() diff --git a/xpra/server/window/window_video_source.py b/xpra/server/window/window_video_source.py index 860759be54..30db5b5f38 100644 --- a/xpra/server/window/window_video_source.py +++ b/xpra/server/window/window_video_source.py @@ -2122,9 +2122,7 @@ def encode_scrolling(self, scroll_data, image : ImageWrapper, options, match_pct #send the scrolls if we have any #(zero change scrolls have been removed - so maybe there are none) if scrolls: - client_options = {} - if flush>0: - client_options["flush"] = flush + client_options = {"flush" : flush} coding = "scroll" end = monotonic() packet = self.make_draw_packet(x, y, w, h, @@ -2164,8 +2162,7 @@ def encode_scrolling(self, scroll_data, image : ImageWrapper, options, match_pct if not data: raise RuntimeError(f"no data from {encoding} function {encode_fn}") flush -= 1 - if flush>0: - client_options["flush"] = flush + client_options["flush"] = flush #if SAVE_TO_FILE: # #hard-coded for BGRA! # from xpra.os_util import memoryview_to_bytes