[gnome-boxes/only-downscale-displays: 10/10] spice-display: Only downscale displays
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/only-downscale-displays: 10/10] spice-display: Only downscale displays
- Date: Tue, 7 Jul 2020 08:47:15 +0000 (UTC)
commit 5d4f78a81ed668157ee6244543e883fbbc02a8c1
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Jun 24 13:07:02 2020 +0200
spice-display: Only downscale displays
When the guest resolution doesn't exactly match the window size,
Boxes currently upscales the output, resulting in a blur, and the
only way to avoid the blur is to carefully resize the window to
the exact guest resolution.
These changes prevent the guest display from getting upscaled,
except when the spice guest agent is connected. In this case, we
want the upscale to trigger the guest resizing, since we can't assess
the guest display resolution programmatically.
Besides, preventing the upscaling from triggering the guest resize
with the guest agent would make users that set an arbitrary screen
resolution unable to reset the screen resolution to match the window
size afterwards.
Fixes #543
src/spice-display.vala | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/spice-display.vala b/src/spice-display.vala
index 78ccd455..dd0a16a1 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -87,6 +87,11 @@ private string get_box_name () {
agent_connected_id = main_channel.notify["agent-connected"].connect (() => {
is_guest_agent_connected = main_channel.agent_connected;
+
+ if (is_guest_agent_connected) {
+ var display = get_display (0) as Spice.Display;
+ display.only_downscale = false;
+ }
});
}
}
@@ -168,6 +173,7 @@ public SpiceDisplay (Machine machine, BoxConfig config, string host, int port, i
});
config.save_properties (this, display_saved_properties);
display.scaling = true;
+ display.only_downscale = true;
displays.replace (n, display);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]