Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* depth support for the desktop server
* don't use jpeg for auto-refresh at low bit depths

git-svn-id: https://xpra.org/svn/Xpra/trunk@15121 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 19, 2017
1 parent c3b1489 commit e03ced8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 4 additions & 1 deletion src/xpra/x11/desktop_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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

Expand All @@ -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":
Expand Down

0 comments on commit e03ced8

Please sign in to comment.