You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 13 Dec 2016 13:31:17 -0500
Subject: [PATCH virt-manager] 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
(cherry picked from commit 88bfdf4926e1223e75468e138d28a1f3756e3cc6)
---
virtManager/console.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/virtManager/console.py b/virtManager/console.py
index 1d33115..326671c 100644
--- a/virtManager/console.py
+++ b/virtManager/console.py
@@ -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))
################