console: drop the console_size_allocate call

This mattered when we were doing widget adjustments to maintain
scaling ratio. But nowadays it seems totally redundant: we are
basically trying to set an allocation that already happened via
the normal chain of widget events, so it's a no-op.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2024-10-02 11:45:23 -04:00
parent 24324bb6f5
commit e5208adc32
2 changed files with 2 additions and 11 deletions

View File

@ -401,7 +401,7 @@ class vmmConsolePages(vmmGObjectUI):
})
self.widget("console-gfx-scroll").connect("size-allocate",
self._scroll_size_allocate)
self._scroll_size_allocate_cb)
self.widget("console-gfx-pages").connect("switch-page",
self._page_changed_cb)
@ -468,7 +468,7 @@ class vmmConsolePages(vmmGObjectUI):
# Resize and scaling APIs #
###########################
def _scroll_size_allocate(self, src_ignore, req):
def _scroll_size_allocate_cb(self, src, req):
if not self._viewer_is_visible():
return
@ -500,11 +500,6 @@ class vmmConsolePages(vmmGObjectUI):
# Reset any previous size_request
self._viewer.console_set_size_request(-1, -1)
viewer_alloc = Gdk.Rectangle()
viewer_alloc.width = req.width
viewer_alloc.height = req.height
self._viewer.console_size_allocate(viewer_alloc)
def _viewer_get_resizeguest_tooltip(self):
tooltip = ""
if self._viewer:

View File

@ -124,8 +124,6 @@ class Viewer(vmmGObject):
self._display.grab_focus()
def _set_size_request(self, *args, **kwargs):
return self._display.set_size_request(*args, **kwargs)
def _size_allocate(self, *args, **kwargs):
return self._display.size_allocate(*args, **kwargs)
def _get_pixbuf(self):
return self._display.get_pixbuf()
@ -240,8 +238,6 @@ class Viewer(vmmGObject):
return bool(self._display and self._keyboard_grab)
def console_set_size_request(self, *args, **kwargs):
return self._set_size_request(*args, **kwargs)
def console_size_allocate(self, *args, **kwargs):
return self._size_allocate(*args, **kwargs)
def console_get_pixbuf(self):
return self._get_pixbuf()