Commit ae55e755 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

spicy: use the scale factor to get the display preferred dimension

Since commit b3059829

 ("spice-widget:
fix widget size request on HiDPI when scaling is disabled"), the
widget requested size is divided by the scale factor.

Multiply it back to get the guest display size (a more precise version
would retrive the associated channel and get the "width" and "height"
property from it)
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent c829f897
Pipeline #236918 passed with stage
in 3 minutes and 1 second
......@@ -589,6 +589,8 @@ static void menu_cb_resize_to(GtkAction *action G_GNUC_UNUSED,
gtk_widget_get_preferred_width(win->spice, NULL, &width);
gtk_widget_get_preferred_height(win->spice, NULL, &height);
width *= gtk_widget_get_scale_factor(win->spice);
height *= gtk_widget_get_scale_factor(win->spice);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_width), width);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_height), height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment