console: Fix size_allocate arguments

This commit is contained in:
Cole Robinson 2013-04-14 16:39:02 -04:00
parent 4107646bf3
commit d440ec4d0d
2 changed files with 5 additions and 9 deletions

View File

@ -40,13 +40,6 @@ Traceback (most recent call last):
return info.invoke(*args, **kwargs)
TypeError: unknown type (null)
Traceback (most recent call last):
File "/home/crobinso/src/virt-manager/src/virtManager/console.py", line 1270, in scroll_size_allocate
self.viewer.display.size_allocate(viewer_alloc)
File "/usr/lib64/python2.7/site-packages/gi/types.py", line 48, in function
return info.invoke(*args, **kwargs)
TypeError: argument allocation: Expected cairo.RectangleInt, but got tuple
virt-manager: drop all the HAL code, we could convert to udev but it's not
really worth it given interface + nodedev APIs

View File

@ -1265,6 +1265,9 @@ class vmmConsolePages(vmmGObjectUI):
desktop_h = int(req.width / desktop_ratio)
dy = (req.height - desktop_h) / 2
# viewer_alloc = (x=dx, y=dy, width=desktop_w, height=desktop_h)
viewer_alloc = (dx, dy, desktop_w, desktop_h)
viewer_alloc = Gdk.Rectangle()
viewer_alloc.x = dx
viewer_alloc.y = dy
viewer_alloc.width = desktop_w
viewer_alloc.height = desktop_h
self.viewer.display.size_allocate(viewer_alloc)