diff --git a/0003_remmina_rdp_monitor_get_fix_maxw_maxh_and_monitorids_calculation.patch b/0003_remmina_rdp_monitor_get_fix_maxw_maxh_and_monitorids_calculation.patch new file mode 100644 index 0000000..31aee2d --- /dev/null +++ b/0003_remmina_rdp_monitor_get_fix_maxw_maxh_and_monitorids_calculation.patch @@ -0,0 +1,57 @@ +From 0c77fe7e8705d320a3f062afefa8d694d5e9e30a Mon Sep 17 00:00:00 2001 +From: Max Ihlenfeldt +Date: Fri, 24 Feb 2023 14:30:29 +0100 +Subject: [PATCH] remmina_rdp_monitor_get(): fix maxw, maxh and monitorids + calculation + +--- + plugins/rdp/rdp_monitor.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/plugins/rdp/rdp_monitor.c b/plugins/rdp/rdp_monitor.c +index fddeed776..384cdb496 100644 +--- a/plugins/rdp/rdp_monitor.c ++++ b/plugins/rdp/rdp_monitor.c +@@ -81,6 +81,7 @@ void remmina_rdp_monitor_get (rfContext *rfi, gchar **monitorids, guint32 *maxwi + gint count = 0; + + static gchar buffer[256]; ++ gint buffer_offset = 0; + + GdkRectangle geometry = { 0, 0, 0, 0 }; + GdkRectangle tempgeom = { 0, 0, 0, 0 }; +@@ -106,8 +107,6 @@ void remmina_rdp_monitor_get (rfContext *rfi, gchar **monitorids, guint32 *maxwi + if (*monitorids) + has_custom_monitors = TRUE; + +- buffer[0] = '\0'; +- + rdpMonitor* base = (rdpMonitor *)freerdp_settings_get_pointer(settings, FreeRDP_MonitorDefArray); + for (gint i = 0; i < n_monitors; ++i) { + rdpMonitor* current; +@@ -144,6 +143,8 @@ void remmina_rdp_monitor_get (rfContext *rfi, gchar **monitorids, guint32 *maxwi + * we must multiply by the scale factor */ + scale = gdk_monitor_get_scale_factor (monitor); + REMMINA_PLUGIN_DEBUG("Monitor n %d scale: %d", index, scale); ++ geometry.x *= scale; ++ geometry.y *= scale; + geometry.width *= scale; + geometry.height *= scale; + REMMINA_PLUGIN_DEBUG("Monitor n %d width: %d", index, geometry.width); +@@ -190,10 +191,10 @@ void remmina_rdp_monitor_get (rfContext *rfi, gchar **monitorids, guint32 *maxwi + //current->y - freerdp_settings_get_uint32(settings, FreeRDP_MonitorLocalShiftY); + //REMMINA_PLUGIN_DEBUG("Monitor n %d calculated y: %d", index, current->y); + +- if (buffer[0] == '\0') +- g_sprintf (buffer, "%d", i); ++ if (buffer_offset == 0) ++ buffer_offset = g_sprintf(buffer + buffer_offset, "%d", i); + else +- g_sprintf(buffer, "%s,%d", buffer, i); ++ buffer_offset = g_sprintf(buffer + buffer_offset, ",%d", i); + REMMINA_PLUGIN_DEBUG("Monitor IDs buffer: %s", buffer); + gdk_rectangle_union(&tempgeom, &geometry, &destgeom); + memcpy(&tempgeom, &destgeom, sizeof tempgeom); +-- +GitLab + diff --git a/remmina.spec b/remmina.spec index d012050..12374e6 100644 --- a/remmina.spec +++ b/remmina.spec @@ -5,7 +5,7 @@ Name: remmina Version: 1.4.29 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: https://remmina.org @@ -20,6 +20,7 @@ Source1: pluginBuild-CMakeLists.txt Patch01: 0001_add_mime_text_formats_for_rdp_clibpoard.patch Patch02: 0002_fix_unlock_crash.patch +Patch03: 0003_remmina_rdp_monitor_get_fix_maxw_maxh_and_monitorids_calculation.patch BuildRequires: cmake BuildRequires: cups-devel @@ -345,6 +346,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1* %changelog +* Tue Feb 28 2023 Phil Wyett - 1.4.29-5 +- Add patch: 0003_remmina_rdp_monitor_get_fix_maxw_maxh_and_monitorids_calculation.patch + * Mon Jan 23 2023 Phil Wyett - 1.4.29-4 - Fix flatpak build - Yaakov Selkowitz . - Make Fedora greater than or equal to 37 use libsoup3 and webkit2gtk-4.1.