Skip to content

Commit

Permalink
ensure we chose an auto-refresh encoding that is supported
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@6420 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 9, 2014
1 parent 37f42ea commit eda0082
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xpra/server/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ def __init__(self, idle_add, timeout_add, source_remove,
self.generic_encodings = encoding_options.boolget("generic")
self.supports_transparency = HAS_ALPHA and encoding_options.boolget("transparency")
self.full_frames_only = encoding_options.boolget("full_frames_only")
ropts = ["png", "webp", "rgb", "jpeg"]
ropts = set(("png", "webp", "rgb", "jpeg")) #default encodings for auto-refresh
if self.webp_leaks:
ropts.remove("webp")
self.client_refresh_encodings = encoding_options.strlistget("auto_refresh_encodings", [x for x in self.encodings if x in ropts])
ropts.remove("webp") #don't use webp if the client is going to leak with it!
ropts = ropts.intersection(set(self.server_core_encodings)) #ensure the server has support for it
ropts = ropts.intersection(set(self.core_encodings)) #ensure the client has support for it
self.client_refresh_encodings = encoding_options.strlistget("auto_refresh_encodings", list(ropts))
self.supports_delta = []
if xor_str is not None and not window.is_tray():
self.supports_delta = [x for x in encoding_options.strlistget("supports_delta", []) if x in ("png", "rgb24", "rgb32")]
Expand Down

0 comments on commit eda0082

Please sign in to comment.