From d25227f4c5c0fbdbea1dca247fc943cd373eb750 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Thu, 9 Feb 2017 23:05:28 -0800 Subject: [PATCH] change rdp_monitor struct to match protocol --- client/X11/xf_monitor.c | 8 ++++---- include/freerdp/settings.h | 8 ++++---- libfreerdp-core/gcc.c | 8 ++++---- libfreerdp-utils/args.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client/X11/xf_monitor.c b/client/X11/xf_monitor.c index b5877a06..e9844682 100644 --- a/client/X11/xf_monitor.c +++ b/client/X11/xf_monitor.c @@ -158,10 +158,10 @@ tbool xf_detect_monitors(xfInfo* xfi, rdpSettings* settings) for (i = 0; i < vscreen->nmonitors; i++) { - settings->monitors[i].x = vscreen->monitors[i].area.left; - settings->monitors[i].y = vscreen->monitors[i].area.top; - settings->monitors[i].width = vscreen->monitors[i].area.right - vscreen->monitors[i].area.left + 1; - settings->monitors[i].height = vscreen->monitors[i].area.bottom - vscreen->monitors[i].area.top + 1; + settings->monitors[i].left = vscreen->monitors[i].area.left; + settings->monitors[i].top = vscreen->monitors[i].area.top; + settings->monitors[i].right = vscreen->monitors[i].area.right; + settings->monitors[i].bottom = vscreen->monitors[i].area.bottom; settings->monitors[i].is_primary = vscreen->monitors[i].primary; vscreen->area.left = MIN(vscreen->monitors[i].area.left, vscreen->area.left); diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index a73491b3..2655991f 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -223,10 +223,10 @@ typedef struct _GLYPH_CACHE_DEFINITION GLYPH_CACHE_DEFINITION; struct rdp_monitor { - int x; - int y; - int width; - int height; + int left; + int top; + int right; + int bottom; int is_primary; }; diff --git a/libfreerdp-core/gcc.c b/libfreerdp-core/gcc.c index 0de78810..016760cd 100644 --- a/libfreerdp-core/gcc.c +++ b/libfreerdp-core/gcc.c @@ -1148,10 +1148,10 @@ void gcc_write_client_monitor_data(STREAM* s, rdpSettings* settings) for (i = 0; i < settings->num_monitors; i++) { - left = settings->monitors[i].x; - top = settings->monitors[i].y; - right = left + settings->monitors[i].width - 1; - bottom = top + settings->monitors[i].height - 1; + left = settings->monitors[i].left; + top = settings->monitors[i].top; + right = settings->monitors[i].right; + bottom = settings->monitors[i].bottom; flags = settings->monitors[i].is_primary ? MONITOR_PRIMARY : 0; stream_write_uint32(s, left); /* left */ diff --git a/libfreerdp-utils/args.c b/libfreerdp-utils/args.c index b92ed62c..7f18c831 100644 --- a/libfreerdp-utils/args.c +++ b/libfreerdp-utils/args.c @@ -801,13 +801,13 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, { for (n = 0; n < settings->num_monitors; n++) { - settings->monitors[n].x = atoi(argv[index + 1]); + settings->monitors[n].left = atoi(argv[index + 1]); index++; - settings->monitors[n].y = atoi(argv[index + 1]); + settings->monitors[n].top = atoi(argv[index + 1]); index++; - settings->monitors[n].width = settings->monitors[n].x + atoi(argv[index + 1]) - 1; + settings->monitors[n].right = settings->monitors[n].left + atoi(argv[index + 1]) - 1; index++; - settings->monitors[n].height = settings->monitors[n].y + atoi(argv[index + 1]) - 1; + settings->monitors[n].bottom = settings->monitors[n].top + atoi(argv[index + 1]) - 1; index++; settings->monitors[n].is_primary = atoi(argv[index + 1]); index++;