Commit cbdda333 authored by hexchain's avatar hexchain Committed by Frediano Ziglio
Browse files

spice-widget: ensure a 640x480 initial size on HiDPI


Signed-off-by: hexchain's avatarHaochen Tong <i@hexchain.org>
Acked-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
parent d589fdaf
......@@ -209,19 +209,16 @@ static void update_size_request(SpiceDisplay *display)
gint reqwidth, reqheight;
gint scale_factor;
scale_factor = gtk_widget_get_scale_factor(GTK_WIDGET(display));
if (d->resize_guest_enable || d->allow_scaling) {
reqwidth = 640;
reqheight = 480;
reqwidth = 640 / scale_factor;
reqheight = 480 / scale_factor;
} else {
reqwidth = d->area.width;
reqheight = d->area.height;
reqwidth = d->area.width / scale_factor;
reqheight = d->area.height / scale_factor;
}
scale_factor = gtk_widget_get_scale_factor(GTK_WIDGET(display));
reqwidth /= scale_factor;
reqheight /= scale_factor;
gtk_widget_set_size_request(GTK_WIDGET(display), reqwidth, reqheight);
recalc_geometry(GTK_WIDGET(display));
update_mouse_cursor(display);
......
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