Skip to content

Commit

Permalink
always clamp the desktop size to the maximum screen size
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@10623 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Sep 11, 2015
1 parent 9c2aa22 commit dd1b233
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/xpra/server/server_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,10 @@ def do_parse_screen_info(self, ss):
#prefer desktop size, fallback to screen size:
w = dw or sw
h = dh or sh
#clamp to max supported:
maxw, maxh = self.get_max_screen_size()
w = min(w, maxw)
h = min(h, maxh)
self.calculate_desktops()
self.calculate_workarea(w, h)
self.set_desktop_geometry(w, h)
Expand Down Expand Up @@ -1709,6 +1713,8 @@ def get_root_window_size(self):
def send_updated_screen_size(self):
max_w, max_h = self.get_max_screen_size()
root_w, root_h = self.get_root_window_size()
root_w = min(root_w, max_w)
root_h = min(root_h, max_h)
count = 0
for ss in self._server_sources.values():
if ss.updated_desktop_size(root_w, root_h, max_w, max_h):
Expand Down

0 comments on commit dd1b233

Please sign in to comment.