console: Fix resize to VM on wayland (bug 1397598)

Yet another issue with not using window.get_size() and instead using
its size allocation directly, which differ on wayland due to client
side decorations.

https://bugzilla.redhat.com/show_bug.cgi?id=1397598
This commit is contained in:
Cole Robinson 2016-12-13 13:31:17 -05:00
parent 107aa2b134
commit 88bfdf4926
1 changed files with 3 additions and 3 deletions

View File

@ -455,14 +455,14 @@ class vmmConsolePages(vmmGObjectUI):
if not self._viewer.console_get_desktop_resolution():
return
topwin_alloc = self.topwin.get_allocation()
top_w, top_h = self.topwin.get_size()
viewer_alloc = self.widget("console-gfx-scroll").get_allocation()
desktop_w, desktop_h = self._viewer.console_get_desktop_resolution()
self.topwin.unmaximize()
self.topwin.resize(
desktop_w + (topwin_alloc.width - viewer_alloc.width),
desktop_h + (topwin_alloc.height - viewer_alloc.height))
desktop_w + (top_w - viewer_alloc.width),
desktop_h + (top_h - viewer_alloc.height))
################