mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-07 14:43:01 -06:00
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:
parent
24324bb6f5
commit
e5208adc32
@ -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:
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user