Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change rdp_monitor struct to match protocol #8

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/X11/xf_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions include/freerdp/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
8 changes: 4 additions & 4 deletions libfreerdp-core/gcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
8 changes: 4 additions & 4 deletions libfreerdp-utils/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down