[gnome-boxes/only-downscale-displays] spice-display: Only downscale displays
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/only-downscale-displays] spice-display: Only downscale displays
- Date: Wed, 24 Jun 2020 11:13:13 +0000 (UTC)
commit b8ff30658ce4fd82ed4652564dd41f83c8618f7d
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]