diff --git a/src/xpra/server/window/window_source.py b/src/xpra/server/window/window_source.py index a9ff5a34da..aafeed58c5 100644 --- a/src/xpra/server/window/window_source.py +++ b/src/xpra/server/window/window_source.py @@ -731,7 +731,7 @@ def update_encoding_options(self, force_reload=False): else: #sane defaults: ropts = set(("png", "rgb24", "rgb32")) #default encodings for auto-refresh - if AUTO_REFRESH_QUALITY<100: + if AUTO_REFRESH_QUALITY<100 and self.image_depth>16: ropts.add("jpeg") are = [x for x in PREFERED_ENCODING_ORDER if x in ropts] self.auto_refresh_encodings = [x for x in are if x in self.common_encodings] diff --git a/src/xpra/x11/desktop_server.py b/src/xpra/x11/desktop_server.py index d228fe7109..063166168b 100644 --- a/src/xpra/x11/desktop_server.py +++ b/src/xpra/x11/desktop_server.py @@ -65,7 +65,7 @@ class DesktopModel(WindowModelStub, WindowDamageHandler): } - _property_names = ["xid", "client-machine", "window-type", "shadow", "size-hints", "class-instance", "focused", "title"] + _property_names = ["xid", "client-machine", "window-type", "shadow", "size-hints", "class-instance", "focused", "title", "depth"] _dynamic_property_names = ["size-hints"] def __init__(self, root): @@ -81,6 +81,7 @@ def setup(self): screen = self.client_window.get_screen() screen.connect("size-changed", self._screen_size_changed) self.update_size_hints(screen) + self._depth = X11Window.get_depth(self.client_window.xid) self._managed = True self._setup_done = True @@ -103,6 +104,8 @@ def uses_XShm(self): def get_property(self, prop): if prop=="xid": return self.client_window.xid + elif prop=="depth": + return self._depth elif prop=="title": return get_wm_name() or "xpra desktop" elif prop=="client-machine":