diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-12-01 16:50:05 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-12-01 16:51:02 +0400 |
commit | c829f89788e767abbcb31f75050e913a1b55279f (patch) | |
tree | 5866edd36512f1db80d08f86911d37695b5f2b88 | |
parent | b0651e424a7bf44f02e17b074015218180699371 (diff) |
Revert "spice-widget: ensure a 640x480 initial size on HiDPI"
This reverts commit cbdda3334724f5bb7afe9e21ce0e972e53e71fdc.
This commit doesn't actually do anything useful.
-rw-r--r-- | src/spice-widget.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/spice-widget.c b/src/spice-widget.c index c39af82..36bceaf 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -209,16 +209,19 @@ 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 / scale_factor; - reqheight = 480 / scale_factor; + reqwidth = 640; + reqheight = 480; } else { - reqwidth = d->area.width / scale_factor; - reqheight = d->area.height / scale_factor; + reqwidth = d->area.width; + reqheight = d->area.height; } + 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); |