Skip to content

Commit

Permalink
fix for clients that send screen size information in old format (ie: …
Browse files Browse the repository at this point in the history
…android)

git-svn-id: https://xpra.org/svn/Xpra/trunk@5209 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 17, 2014
1 parent b86ccd9 commit 0c169a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/xpra/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def listget(self, k, default_value=[], item_type=None, max_items=None):


def log_screen_sizes(root_w, root_h, ss):
try:
do_log_screen_sizes(root_w, root_h, ss)
except Exception, e:
from xpra.log import Logger
log = Logger()
log.warn("failed to parse screen size information: %s", e)

def do_log_screen_sizes(root_w, root_h, ss):
from xpra.log import Logger
log = Logger()
log.info("root size is %sx%s with %s screen(s):", root_w, root_h, len(ss))
Expand All @@ -110,7 +118,11 @@ def prstr(s, default=""):
return default
#prettify strings on win32
return s.lstrip("0\\").lstrip(".\\").replace("0\\", "-")
#old format, used by some clients (android):
if len(ss)==2 and type(ss[0])==int and type(ss[1])==int:
return
for s in ss:
log.info("s=%s=%s", s, type(s))
if len(s)<10:
log.info(" %s", s)
continue
Expand Down

0 comments on commit 0c169a3

Please sign in to comment.