mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
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:
parent
107aa2b134
commit
88bfdf4926
@ -455,14 +455,14 @@ class vmmConsolePages(vmmGObjectUI):
|
|||||||
if not self._viewer.console_get_desktop_resolution():
|
if not self._viewer.console_get_desktop_resolution():
|
||||||
return
|
return
|
||||||
|
|
||||||
topwin_alloc = self.topwin.get_allocation()
|
top_w, top_h = self.topwin.get_size()
|
||||||
viewer_alloc = self.widget("console-gfx-scroll").get_allocation()
|
viewer_alloc = self.widget("console-gfx-scroll").get_allocation()
|
||||||
desktop_w, desktop_h = self._viewer.console_get_desktop_resolution()
|
desktop_w, desktop_h = self._viewer.console_get_desktop_resolution()
|
||||||
|
|
||||||
self.topwin.unmaximize()
|
self.topwin.unmaximize()
|
||||||
self.topwin.resize(
|
self.topwin.resize(
|
||||||
desktop_w + (topwin_alloc.width - viewer_alloc.width),
|
desktop_w + (top_w - viewer_alloc.width),
|
||||||
desktop_h + (topwin_alloc.height - viewer_alloc.height))
|
desktop_h + (top_h - viewer_alloc.height))
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
|
Loading…
Reference in New Issue
Block a user