Description of problem: cannot resize the vm window smaller when "Alway" and "Auto resize VM with window" are active. Version-Release number of selected component (if applicable): virt-manager-1.4.0-2.el7.noarch How reproducible: 100% Steps to Reproduce: 1. Prepare a running spice guest. 2. Activate "View->Scale Display->Always & Auto resize VM with window". 3. Move the mouse cursor to the bottom right corner of the vm winodw. 4. Try to drag the window to top left and bottom right directions. Actual results: The vm window can only be resized larger and can't be resized smaller. Expected results: The vm window should be resized smaller when drag the window smaller. Additional info:
Well, I think this is expectable. But lets see what Pavel will say...
Virt-viewer doesn't suffer with the same issue and it does scaling and auto-resizing by default so this is probably a bug in virt-manager. Moving to upstream.
Created attachment 1556464 [details] workaround Hi, The bug is still present. Here is my workaround, maybe not the best but seems to work.
The workaround from dav87legrand works. I looked into the code but could not figure out why: ``` if is_resizeguest: # With resize guest, we don't want to maintain aspect ratio, # since the guest can resize to arbitrary resolutions. self._viewer.console_set_size_request(req.width, req.height) return ``` would not resize the window but ``` if is_resizeguest: # With resize guest, we don't want to maintain aspect ratio, # since the guest can resize to arbitrary resolutions. # self._viewer.console_set_size_request(req.width, req.height) viewer_alloc = Gdk.Rectangle() viewer_alloc.width = req.width viewer_alloc.height = req.height self._viewer.console_size_allocate(viewer_alloc) return ``` would. How do we get this merged (or properly fixed by someone with more gtk knowledge :))? Would a merge request on github help?
Fixed upstream now by Florian: https://github.com/virt-manager/virt-manager/commit/ae19d6d6ec0b48085ce1c765fb2264e27fb51c63