Skip to content

Commit

Permalink
also figure out the maximum size instead of hard-coding it
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@17120 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 9, 2017
1 parent 97a818c commit 95ef11d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/xpra/x11/desktop_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def update_size_hints(self, screen):
size_hints = {}
else:
size_hints = {
"maximum-size" : (8192, 4096),
"minimum-aspect-ratio" : (1, 3),
"maximum-aspect-ratio" : (3, 1),
}
Expand All @@ -198,6 +197,12 @@ def update_size_hints(self, screen):
except:
screenlog("failed to query screen sizes", exc_info=True)
else:
#find the maximum size supported:
max_size = {}
for tw, th in screen_sizes:
max_size[tw*th] = (tw, th)
max_pixels = reversed(sorted(max_size.keys()))[0]
size_hints["maximum-size"] = max_size[max_pixels]
#find the best increment we can use:
inc_hits = {}
#we should also figure out what the potential increments are,
Expand Down

0 comments on commit 95ef11d

Please sign in to comment.