libxrdp: add Montior Layout PDU (server to client), temporary hack
This commit is contained in:
parent
4bce6f78c0
commit
2dc5f49132
@ -52,6 +52,16 @@ static tui8 g_unknown1[172] =
|
||||
0x2b, 0x00, 0x2a, 0x00
|
||||
};
|
||||
|
||||
static tui8 g_monitorlayout[44] =
|
||||
{
|
||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x7F, 0x07, 0x00, 0x00,
|
||||
0x37, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0x0E, 0x00, 0x00, 0x37, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
/* some compilers need unsigned char to avoid warnings */
|
||||
/*
|
||||
static tui8 g_unknown2[8] =
|
||||
@ -1600,7 +1610,33 @@ xrdp_rdp_send_unknown1(struct xrdp_rdp *self)
|
||||
free_stream(s);
|
||||
return 0;
|
||||
}
|
||||
/*****************************************************************************/
|
||||
static int APP_CC
|
||||
xrdp_rdp_send_monitorlayout(struct xrdp_rdp *self)
|
||||
{
|
||||
struct stream *s;
|
||||
|
||||
make_stream(s);
|
||||
init_stream(s, 8192);
|
||||
|
||||
if (xrdp_rdp_init_data(self, s) != 0)
|
||||
{
|
||||
free_stream(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
out_uint8a(s, g_monitorlayout, 44);
|
||||
s_mark_end(s);
|
||||
|
||||
if (xrdp_rdp_send_data(self, s, 0x37) != 0)
|
||||
{
|
||||
free_stream(s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
free_stream(s);
|
||||
return 0;
|
||||
}
|
||||
/*****************************************************************************/
|
||||
static int APP_CC
|
||||
xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
|
||||
@ -1619,6 +1655,12 @@ xrdp_rdp_process_data_font(struct xrdp_rdp *self, struct stream *s)
|
||||
/* running */
|
||||
DEBUG(("sending unknown1"));
|
||||
xrdp_rdp_send_unknown1(self);
|
||||
if (self->client_info.monitorCount > 0) {
|
||||
if (xrdp_rdp_send_monitorlayout(self) != 0)
|
||||
{
|
||||
g_writeln("Problem with monitor layout packet!!!");
|
||||
}
|
||||
}
|
||||
self->session->up_and_running = 1;
|
||||
DEBUG(("up_and_running set"));
|
||||
xrdp_rdp_send_data_update_sync(self);
|
||||
|
Loading…
Reference in New Issue
Block a user