Skip to content

Commit

Permalink
only add encodings we are allowed to add!
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@7081 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 1, 2014
1 parent caa62b8 commit eee4d7c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/xpra/client/gtk2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,14 @@ def get_supported_window_layouts(self):
def do_get_core_encodings(self):
encodings = GTKXpraClient.do_get_core_encodings(self)
#we can handle rgb32 format (but not necessarily transparency!)
encodings.append("rgb32")
def add(x):
if x in self.allowed_encodings and x not in encodings:
encodings.append(x)
add("rgb32")
#gtk2 can handle 'png' and 'jpeg' natively (without PIL)
#(though using PIL is better since we can do that in the decode thread)
for x in ("png", "jpeg"):
if x not in encodings:
encodings.append(x)
add(x)
return encodings

def has_transparency(self):
Expand Down

0 comments on commit eee4d7c

Please sign in to comment.