mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-28 01:58:08 +03:00
viewers: Log once when checking vnc set_allow_resize support
For debugging purposes. But we will use this pattern in upcoming patches too Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
d79d4633c8
commit
3ee677c2de
@ -34,8 +34,19 @@ from ..baseclass import vmmGObject
|
||||
# VNC/Spice abstraction handling #
|
||||
##################################
|
||||
|
||||
_GTKVNC_SUPPORT_CACHE = {}
|
||||
|
||||
|
||||
def _gtkvnc_check_display_support(funcname):
|
||||
if funcname not in _GTKVNC_SUPPORT_CACHE:
|
||||
val = hasattr(GtkVnc.Display, funcname)
|
||||
log.debug("GtkVnc.Display %s support=%s", funcname, val)
|
||||
_GTKVNC_SUPPORT_CACHE[funcname] = val
|
||||
return _GTKVNC_SUPPORT_CACHE[funcname]
|
||||
|
||||
|
||||
def _gtkvnc_supports_resizeguest():
|
||||
return hasattr(GtkVnc.Display, "set_allow_resize")
|
||||
return _gtkvnc_check_display_support("set_allow_resize")
|
||||
|
||||
|
||||
class Viewer(vmmGObject):
|
||||
|
Loading…
x
Reference in New Issue
Block a user