Bug 1437162

Summary: add HiDPI support to spice-gtk/mingw-virt-viewer, modify scaling steps so that they contain integers
Product: Red Hat Enterprise Linux 8 Reporter: David Jaša <djasa>
Component: mingw-virt-viewerAssignee: Default Assignee for SPICE Bugs <rh-spice-bugs>
Status: CLOSED WONTFIX QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: bztdlinux, cfergeau, dblechte, jan.public, lsurette, mtessun, rh-spice-bugs, srevivo, tpelka, victortoso
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-09 19:15:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Spice RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Jaša 2017-03-29 16:38:33 UTC
Description of problem:
When using Windows 10 on my laptop with 14" 1920x1080 screen as a spice client, Windows scales the mingw-virt-viewer window to 1.5 of the original size so e.g. in fullscreen, the screen size reported to mingw-virt-viewer is 1280x720. This results in blurry display whatever you do: even if you resize the VM display in fullscreen to client window size, the image is scaled twice: FullHD → 1280x720 by remote-viewer to fit the "window" size and back 1280x720 → FullHD by Windows.

The first client-only steps to get acceptable behaviour for HiDPI thus would be:
- update mingw-gtk to 3.22.3 [1] (should be doable, RHEL already has it)
- draw gtk widgets (menus, dialogs) to native DPI to avoid scaling
- tell Windows not to scale spice-gtk widget
- change scaling factor of each step to n-th root of 2 between 1 and 2 (and with  similar to get to 3.0 scaling factor) so that we are able to display legacy guests on HiDPI clients using 2x2 or 3x3 superpixels using just virt-viewer scaling
- optionally: add those discrete scaling steps to the menu, allowing direct selection of good mode

In the future, we should also pass the DPI information all the way to the guest to make things transparent to the user but this is IMO what is needed right now to have at least some support of the scenario.

[1] http://news.softpedia.com/news/gtk-plus-3-22-3-brings-gl-improvements-on-windows-adds-hidpi-support-as-well-510065.shtml

Version-Release number of selected component (if applicable):
w10:
  VirtViewer v2.0-208
  mingw32-spice-gtk3-0.31-6.el7ev.noarch

How reproducible:
always

Steps to Reproduce:
1. on sufficiently smooth display, connect to a VM
2. 
3.

Actual results:
the VM display is blurry whatever you do

Expected results:
the VM display should be sharp with good options of scaling to a usable size

Additional info:
I didn't try HiDPI scenario in Linux yet

Comment 1 Victor Toso 2017-11-30 18:17:06 UTC
Not high priority. I would rather do it at the same time we rebase mingw-virt-viewer, plus we don't have hidpi displays for testing at the moment.

Comment 2 Sandro Bonazzola 2017-12-20 13:59:44 UTC
oVirt 4.2.0 has been released on Dec 20th 2017. Please consider re-targeting this bug to next milestone

Comment 3 Sandro Bonazzola 2019-01-28 09:41:12 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.