diff options
author | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2021-12-17 02:17:24 +0300 |
---|---|---|
committer | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2021-12-17 02:17:24 +0300 |
commit | b209da6a2a7a5b56c6fe086b2f43225cc14a3e4d (patch) | |
tree | 8abfae3384b777402568fde4846031744f6d43e3 /src | |
parent | 2e19a6964f66881fe9fefd3c221325420cd37ab0 (diff) | |
parent | 5f6f5c977b54dafe6d4b6f840bb05b3ffe7a094e (diff) |
Merge branch 'resolution-multiple-four' into 'master'
remote resolution: use multiple of four
See merge request Remmina/Remmina!2353
Diffstat (limited to 'src')
-rw-r--r-- | src/remmina_protocol_widget.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/remmina_protocol_widget.c b/src/remmina_protocol_widget.c index 4e37fe30b..807a37cb0 100644 --- a/src/remmina_protocol_widget.c +++ b/src/remmina_protocol_widget.c @@ -2146,8 +2146,9 @@ void remmina_protocol_widget_update_remote_resolution(RemminaProtocolWidget *gp) /* Use internal window size as remote desktop size */ GtkAllocation al; gtk_widget_get_allocation(GTK_WIDGET(gp), &al); - w = al.width; - h = al.height; + /* use a multiple of four to mitigate scaling when remote host rounds up */ + w = al.width - al.width % 4; + h = al.height - al.height % 4; if (w < 10) { printf("Remmina warning: %s RemminaProtocolWidget w=%d h=%d are too small, adjusting to 640x480\n", __func__, w, h); w = 640; |