Permalink
Browse files

client: handle the resolution increasing

Useful when a server is booting and changes the screen resolution as
the boot progresses.
  • Loading branch information...
1 parent 49ff8c2 commit 7f88af24e75f96c31676633b2186130bc2fede88 Marc Sibson committed Jan 27, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 vncdotool/client.py
View
@@ -211,11 +211,13 @@ def updateRectangle(self, x, y, width, height, data):
from PIL import Image
self.image = Image
-
size = (width, height)
update = self.image.fromstring('RGB', size, data, 'raw', 'RGBX')
if not self.screen:
self.screen = update
+ # track screen upward screen resizes, often occur during os boot
+ elif self.screen.size[0] < width or self.screen.size[1] < height:
+ self.screen = update
else:
self.screen.paste(update, (x, y))

0 comments on commit 7f88af2

Please sign in to comment.