|
|
@ -48,13 +48,14 @@ verifyColorMap(struct mod *mod)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < 255; i++)
|
|
|
|
for (i = 0; i < 255; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mod->colormap[i] != 0)
|
|
|
|
if (mod->colormap[i] != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return ;
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(0, ("The colormap is all NULL"));
|
|
|
|
LLOGLN(0, ("The colormap is all NULL"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -114,47 +115,58 @@ lxrdp_connect(struct mod *mod)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case PREECONNECTERROR:
|
|
|
|
case PREECONNECTERROR:
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
"PREECONNECTERROR");
|
|
|
|
"PREECONNECTERROR");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case UNDEFINEDCONNECTERROR:
|
|
|
|
case UNDEFINEDCONNECTERROR:
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
"UNDEFINEDCONNECTERROR");
|
|
|
|
"UNDEFINEDCONNECTERROR");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case POSTCONNECTERROR:
|
|
|
|
case POSTCONNECTERROR:
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
"POSTCONNECTERROR");
|
|
|
|
"POSTCONNECTERROR");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case DNSERROR:
|
|
|
|
case DNSERROR:
|
|
|
|
g_snprintf(buf, 128, "The DNS system generated an error");
|
|
|
|
g_snprintf(buf, 128, "The DNS system generated an error");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case DNSNAMENOTFOUND:
|
|
|
|
case DNSNAMENOTFOUND:
|
|
|
|
g_snprintf(buf, 128, "The DNS system could not find the "
|
|
|
|
g_snprintf(buf, 128, "The DNS system could not find the "
|
|
|
|
"specified name");
|
|
|
|
"specified name");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case CONNECTERROR:
|
|
|
|
case CONNECTERROR:
|
|
|
|
g_snprintf(buf, 128, "A general connect error was returned");
|
|
|
|
g_snprintf(buf, 128, "A general connect error was returned");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case MCSCONNECTINITIALERROR:
|
|
|
|
case MCSCONNECTINITIALERROR:
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
g_snprintf(buf, 128, "The error code from connect is "
|
|
|
|
"MCSCONNECTINITIALERROR");
|
|
|
|
"MCSCONNECTINITIALERROR");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case TLSCONNECTERROR:
|
|
|
|
case TLSCONNECTERROR:
|
|
|
|
g_snprintf(buf, 128, "Error in TLS handshake");
|
|
|
|
g_snprintf(buf, 128, "Error in TLS handshake");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case AUTHENTICATIONERROR:
|
|
|
|
case AUTHENTICATIONERROR:
|
|
|
|
g_snprintf(buf, 128, "Authentication error check your password "
|
|
|
|
g_snprintf(buf, 128, "Authentication error check your password "
|
|
|
|
"and username");
|
|
|
|
"and username");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case INSUFFICIENTPRIVILEGESERROR:
|
|
|
|
case INSUFFICIENTPRIVILEGESERROR:
|
|
|
|
g_snprintf(buf, 128, "Insufficent privileges on target server");
|
|
|
|
g_snprintf(buf, 128, "Insufficent privileges on target server");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
|
|
|
|
g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
|
|
|
|
connectErrorCode);
|
|
|
|
connectErrorCode);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log_message(LOG_LEVEL_INFO,buf);
|
|
|
|
|
|
|
|
|
|
|
|
log_message(LOG_LEVEL_INFO, buf);
|
|
|
|
mod->server_msg(mod, buf, 0);
|
|
|
|
mod->server_msg(mod, buf, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -198,6 +210,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
switch (msg)
|
|
|
|
switch (msg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case 15: /* key down */
|
|
|
|
case 15: /* key down */
|
|
|
|
|
|
|
|
|
|
|
|
/* Before we handle the first character we synchronize
|
|
|
|
/* Before we handle the first character we synchronize
|
|
|
|
capslock and numlock. */
|
|
|
|
capslock and numlock. */
|
|
|
|
/* We collect the state during the first synchronize
|
|
|
|
/* We collect the state during the first synchronize
|
|
|
@ -208,24 +221,30 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo);
|
|
|
|
mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo);
|
|
|
|
mod->bool_keyBoardSynced = 1;
|
|
|
|
mod->bool_keyBoardSynced = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
|
|
|
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 16: /* key up */
|
|
|
|
case 16: /* key up */
|
|
|
|
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
|
|
|
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 17: /* Synchronize */
|
|
|
|
case 17: /* Synchronize */
|
|
|
|
LLOGLN(11, ("Synchronized event handled : %d",param1));
|
|
|
|
LLOGLN(11, ("Synchronized event handled : %d", param1));
|
|
|
|
/* In some situations the Synchronize event come to early.
|
|
|
|
/* In some situations the Synchronize event come to early.
|
|
|
|
Therefore we store this information and use it when we
|
|
|
|
Therefore we store this information and use it when we
|
|
|
|
receive the first keyboard event
|
|
|
|
receive the first keyboard event
|
|
|
|
Without this fix numlock and capslock can come
|
|
|
|
Without this fix numlock and capslock can come
|
|
|
|
out of sync. */
|
|
|
|
out of sync. */
|
|
|
|
mod->inst->input->SynchronizeEvent(mod->inst->input, param1);
|
|
|
|
mod->inst->input->SynchronizeEvent(mod->inst->input, param1);
|
|
|
|
|
|
|
|
|
|
|
|
if (!mod->bool_keyBoardSynced)
|
|
|
|
if (!mod->bool_keyBoardSynced)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mod->keyBoardLockInfo = param1;
|
|
|
|
mod->keyBoardLockInfo = param1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 100: /* mouse move */
|
|
|
|
case 100: /* mouse move */
|
|
|
|
LLOGLN(12, ("mouse move %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("mouse move %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -233,6 +252,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_MOVE;
|
|
|
|
flags = PTR_FLAGS_MOVE;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 101: /* left button up */
|
|
|
|
case 101: /* left button up */
|
|
|
|
LLOGLN(12, ("left button up %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("left button up %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -240,6 +260,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_BUTTON1;
|
|
|
|
flags = PTR_FLAGS_BUTTON1;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 102: /* left button down */
|
|
|
|
case 102: /* left button down */
|
|
|
|
LLOGLN(12, ("left button down %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("left button down %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -247,6 +268,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_BUTTON1 | PTR_FLAGS_DOWN;
|
|
|
|
flags = PTR_FLAGS_BUTTON1 | PTR_FLAGS_DOWN;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 103: /* right button up */
|
|
|
|
case 103: /* right button up */
|
|
|
|
LLOGLN(12, ("right button up %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("right button up %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -254,6 +276,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_BUTTON2;
|
|
|
|
flags = PTR_FLAGS_BUTTON2;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 104: /* right button down */
|
|
|
|
case 104: /* right button down */
|
|
|
|
LLOGLN(12, ("right button down %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("right button down %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -261,6 +284,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_BUTTON2 | PTR_FLAGS_DOWN;
|
|
|
|
flags = PTR_FLAGS_BUTTON2 | PTR_FLAGS_DOWN;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 105: /* middle button up */
|
|
|
|
case 105: /* middle button up */
|
|
|
|
LLOGLN(12, ("middle button up %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("middle button up %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -268,6 +292,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_BUTTON3;
|
|
|
|
flags = PTR_FLAGS_BUTTON3;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 106: /* middle button down */
|
|
|
|
case 106: /* middle button down */
|
|
|
|
LLOGLN(12, ("middle button down %d %d", param1, param2));
|
|
|
|
LLOGLN(12, ("middle button down %d %d", param1, param2));
|
|
|
|
x = param1;
|
|
|
|
x = param1;
|
|
|
@ -275,18 +300,23 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
flags = PTR_FLAGS_BUTTON3 | PTR_FLAGS_DOWN;
|
|
|
|
flags = PTR_FLAGS_BUTTON3 | PTR_FLAGS_DOWN;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 107: /* wheel up */
|
|
|
|
case 107: /* wheel up */
|
|
|
|
flags = PTR_FLAGS_WHEEL | 0x0078;
|
|
|
|
flags = PTR_FLAGS_WHEEL | 0x0078;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 108:
|
|
|
|
case 108:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 109: /* wheel down */
|
|
|
|
case 109: /* wheel down */
|
|
|
|
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
|
|
|
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
|
|
|
|
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 110:
|
|
|
|
case 110:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 200:
|
|
|
|
case 200:
|
|
|
|
LLOGLN(10, ("Invalidate request sent from client"));
|
|
|
|
LLOGLN(10, ("Invalidate request sent from client"));
|
|
|
|
x = (param1 >> 16) & 0xffff;
|
|
|
|
x = (param1 >> 16) & 0xffff;
|
|
|
@ -295,6 +325,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
cy = (param2 >> 0) & 0xffff;
|
|
|
|
cy = (param2 >> 0) & 0xffff;
|
|
|
|
mod->inst->SendInvalidate(mod->inst, -1, x, y, cx, cy);
|
|
|
|
mod->inst->SendInvalidate(mod->inst, -1, x, y, cx, cy);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 0x5555:
|
|
|
|
case 0x5555:
|
|
|
|
chanid = LOWORD(param1);
|
|
|
|
chanid = LOWORD(param1);
|
|
|
|
flags = HIWORD(param1);
|
|
|
|
flags = HIWORD(param1);
|
|
|
@ -303,6 +334,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
total_size = (int)param4;
|
|
|
|
total_size = (int)param4;
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(12, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags));
|
|
|
|
LLOGLN(12, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags));
|
|
|
|
|
|
|
|
|
|
|
|
if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels))
|
|
|
|
if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("lxrdp_event: error chanid %d", chanid));
|
|
|
|
LLOGLN(0, ("lxrdp_event: error chanid %d", chanid));
|
|
|
@ -316,6 +348,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
mod->inst->SendChannelData(mod->inst, lchid, (tui8 *)data, total_size);
|
|
|
|
mod->inst->SendChannelData(mod->inst, lchid, (tui8 *)data, total_size);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
/* end */
|
|
|
|
/* end */
|
|
|
|
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
|
|
|
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
|
|
@ -327,6 +360,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
mod->chan_buf_bytes = 0;
|
|
|
|
mod->chan_buf_bytes = 0;
|
|
|
|
mod->chan_buf_valid = 0;
|
|
|
|
mod->chan_buf_valid = 0;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
/* start */
|
|
|
|
/* start */
|
|
|
|
g_free(mod->chan_buf);
|
|
|
|
g_free(mod->chan_buf);
|
|
|
@ -336,6 +370,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
|
|
|
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
|
|
|
mod->chan_buf_valid += size;
|
|
|
|
mod->chan_buf_valid += size;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
/* middle */
|
|
|
|
/* middle */
|
|
|
|
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
|
|
|
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
|
|
|
@ -344,6 +379,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
LLOGLN(0, ("Unhandled message type in eventhandler %d", msg));
|
|
|
|
LLOGLN(0, ("Unhandled message type in eventhandler %d", msg));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -587,16 +623,18 @@ lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap)
|
|
|
|
|
|
|
|
|
|
|
|
if (bd->compressed)
|
|
|
|
if (bd->compressed)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(20,("decompress size : %d",bd->bitmapLength));
|
|
|
|
LLOGLN(20, ("decompress size : %d", bd->bitmapLength));
|
|
|
|
if(!bitmap_decompress(bd->bitmapDataStream, (tui8 *)dst_data, bd->width,
|
|
|
|
|
|
|
|
bd->height, bd->bitmapLength, server_bpp, server_bpp)){
|
|
|
|
if (!bitmap_decompress(bd->bitmapDataStream, (tui8 *)dst_data, bd->width,
|
|
|
|
LLOGLN(0,("Failure to decompress the bitmap"));
|
|
|
|
bd->height, bd->bitmapLength, server_bpp, server_bpp))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LLOGLN(0, ("Failure to decompress the bitmap"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* bitmap is upside down */
|
|
|
|
/* bitmap is upside down */
|
|
|
|
LLOGLN(10,("bitmap upside down"));
|
|
|
|
LLOGLN(10, ("bitmap upside down"));
|
|
|
|
src = (char *)(bd->bitmapDataStream);
|
|
|
|
src = (char *)(bd->bitmapDataStream);
|
|
|
|
dst = dst_data + bd->height * line_bytes;
|
|
|
|
dst = dst_data + bd->height * line_bytes;
|
|
|
|
|
|
|
|
|
|
|
@ -661,14 +699,15 @@ lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt)
|
|
|
|
patblt->backColor, mod->colormap);
|
|
|
|
patblt->backColor, mod->colormap);
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(10, ("lfreerdp_pat_blt: nLeftRect %d nTopRect %d "
|
|
|
|
LLOGLN(10, ("lfreerdp_pat_blt: nLeftRect %d nTopRect %d "
|
|
|
|
"nWidth %d nHeight %d fgcolor 0x%8.8x bgcolor 0x%8.8x",
|
|
|
|
"nWidth %d nHeight %d fgcolor 0x%8.8x bgcolor 0x%8.8x",
|
|
|
|
patblt->nLeftRect, patblt->nTopRect,
|
|
|
|
patblt->nLeftRect, patblt->nTopRect,
|
|
|
|
patblt->nWidth, patblt->nHeight, fgcolor, bgcolor));
|
|
|
|
patblt->nWidth, patblt->nHeight, fgcolor, bgcolor));
|
|
|
|
|
|
|
|
|
|
|
|
if (fgcolor == bgcolor)
|
|
|
|
if (fgcolor == bgcolor)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("Warning same color on both bg and fg"));
|
|
|
|
LLOGLN(0, ("Warning same color on both bg and fg"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mod->server_set_mixmode(mod, 1);
|
|
|
|
mod->server_set_mixmode(mod, 1);
|
|
|
|
mod->server_set_opcode(mod, patblt->bRop);
|
|
|
|
mod->server_set_opcode(mod, patblt->bRop);
|
|
|
|
mod->server_set_fgcolor(mod, fgcolor);
|
|
|
|
mod->server_set_fgcolor(mod, fgcolor);
|
|
|
@ -733,9 +772,9 @@ lfreerdp_opaque_rect(rdpContext *context, OPAQUE_RECT_ORDER *opaque_rect)
|
|
|
|
fgcolor = convert_color(server_bpp, client_bpp,
|
|
|
|
fgcolor = convert_color(server_bpp, client_bpp,
|
|
|
|
opaque_rect->color, mod->colormap);
|
|
|
|
opaque_rect->color, mod->colormap);
|
|
|
|
LLOGLN(10, ("lfreerdp_opaque_rect: nLeftRect %d nTopRect %d "
|
|
|
|
LLOGLN(10, ("lfreerdp_opaque_rect: nLeftRect %d nTopRect %d "
|
|
|
|
"nWidth %d nHeight %d fgcolor 0x%8.8x",
|
|
|
|
"nWidth %d nHeight %d fgcolor 0x%8.8x",
|
|
|
|
opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
|
|
|
opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
|
|
|
opaque_rect->nWidth, opaque_rect->nHeight, fgcolor));
|
|
|
|
opaque_rect->nWidth, opaque_rect->nHeight, fgcolor));
|
|
|
|
mod->server_set_fgcolor(mod, fgcolor);
|
|
|
|
mod->server_set_fgcolor(mod, fgcolor);
|
|
|
|
mod->server_fill_rect(mod, opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
|
|
|
mod->server_fill_rect(mod, opaque_rect->nLeftRect, opaque_rect->nTopRect,
|
|
|
|
opaque_rect->nWidth, opaque_rect->nHeight);
|
|
|
|
opaque_rect->nWidth, opaque_rect->nHeight);
|
|
|
@ -808,16 +847,16 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
|
|
|
bgcolor = convert_color(server_bpp, client_bpp,
|
|
|
|
bgcolor = convert_color(server_bpp, client_bpp,
|
|
|
|
glyph_index->backColor, mod->colormap);
|
|
|
|
glyph_index->backColor, mod->colormap);
|
|
|
|
LLOGLN(10, ("lfreerdp_glyph_index: "
|
|
|
|
LLOGLN(10, ("lfreerdp_glyph_index: "
|
|
|
|
"bkLeft %d bkTop %d width %d height %d "
|
|
|
|
"bkLeft %d bkTop %d width %d height %d "
|
|
|
|
"opLeft %d opTop %d width %d height %d "
|
|
|
|
"opLeft %d opTop %d width %d height %d "
|
|
|
|
"cbData %d fgcolor 0x%8.8x bgcolor 0x%8.8x fOpRedundant %d",
|
|
|
|
"cbData %d fgcolor 0x%8.8x bgcolor 0x%8.8x fOpRedundant %d",
|
|
|
|
glyph_index->bkLeft, glyph_index->bkTop,
|
|
|
|
glyph_index->bkLeft, glyph_index->bkTop,
|
|
|
|
glyph_index->bkRight - glyph_index->bkLeft,
|
|
|
|
glyph_index->bkRight - glyph_index->bkLeft,
|
|
|
|
glyph_index->bkBottom - glyph_index->bkTop,
|
|
|
|
glyph_index->bkBottom - glyph_index->bkTop,
|
|
|
|
glyph_index->opLeft, glyph_index->opTop,
|
|
|
|
glyph_index->opLeft, glyph_index->opTop,
|
|
|
|
glyph_index->opRight - glyph_index->opLeft,
|
|
|
|
glyph_index->opRight - glyph_index->opLeft,
|
|
|
|
glyph_index->opBottom - glyph_index->opTop,
|
|
|
|
glyph_index->opBottom - glyph_index->opTop,
|
|
|
|
glyph_index->cbData, fgcolor, bgcolor, glyph_index->fOpRedundant));
|
|
|
|
glyph_index->cbData, fgcolor, bgcolor, glyph_index->fOpRedundant));
|
|
|
|
mod->server_set_bgcolor(mod, fgcolor);
|
|
|
|
mod->server_set_bgcolor(mod, fgcolor);
|
|
|
|
mod->server_set_fgcolor(mod, bgcolor);
|
|
|
|
mod->server_set_fgcolor(mod, bgcolor);
|
|
|
|
opLeft = glyph_index->opLeft;
|
|
|
|
opLeft = glyph_index->opLeft;
|
|
|
@ -825,6 +864,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
|
|
|
opRight = glyph_index->opRight;
|
|
|
|
opRight = glyph_index->opRight;
|
|
|
|
opBottom = glyph_index->opBottom;
|
|
|
|
opBottom = glyph_index->opBottom;
|
|
|
|
#if 1
|
|
|
|
#if 1
|
|
|
|
|
|
|
|
|
|
|
|
/* workarounds for freerdp not using fOpRedundant in
|
|
|
|
/* workarounds for freerdp not using fOpRedundant in
|
|
|
|
glyph.c::update_gdi_glyph_index */
|
|
|
|
glyph.c::update_gdi_glyph_index */
|
|
|
|
if (glyph_index->fOpRedundant)
|
|
|
|
if (glyph_index->fOpRedundant)
|
|
|
@ -832,8 +872,9 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
|
|
|
opLeft = glyph_index->bkLeft;
|
|
|
|
opLeft = glyph_index->bkLeft;
|
|
|
|
opTop = glyph_index->bkTop;
|
|
|
|
opTop = glyph_index->bkTop;
|
|
|
|
opRight = glyph_index->bkRight;
|
|
|
|
opRight = glyph_index->bkRight;
|
|
|
|
opBottom =glyph_index->bkBottom;
|
|
|
|
opBottom = glyph_index->bkBottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
mod->server_draw_text(mod, glyph_index->cacheId, glyph_index->flAccel,
|
|
|
|
mod->server_draw_text(mod, glyph_index->cacheId, glyph_index->flAccel,
|
|
|
|
glyph_index->fOpRedundant,
|
|
|
|
glyph_index->fOpRedundant,
|
|
|
@ -881,7 +922,7 @@ lfreerdp_cache_bitmap(rdpContext *context, CACHE_BITMAP_ORDER *cache_bitmap_orde
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
/* Turn the bitmap upside down*/
|
|
|
|
/* Turn the bitmap upside down*/
|
|
|
|
static void DEFAULT_CC
|
|
|
|
static void DEFAULT_CC
|
|
|
|
lfreerdp_upsidedown(uint8* destination, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, int server_Bpp)
|
|
|
|
lfreerdp_upsidedown(uint8 *destination, CACHE_BITMAP_V2_ORDER *cache_bitmap_v2_order, int server_Bpp)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tui8 *src;
|
|
|
|
tui8 *src;
|
|
|
|
tui8 *dst;
|
|
|
|
tui8 *dst;
|
|
|
@ -1094,7 +1135,7 @@ static void DEFAULT_CC
|
|
|
|
lfreerdp_pointer_system(rdpContext *context,
|
|
|
|
lfreerdp_pointer_system(rdpContext *context,
|
|
|
|
POINTER_SYSTEM_UPDATE *pointer_system)
|
|
|
|
POINTER_SYSTEM_UPDATE *pointer_system)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("lfreerdp_pointer_system: - no code here type value = %d",pointer_system->type));
|
|
|
|
LLOGLN(0, ("lfreerdp_pointer_system: - no code here type value = %d", pointer_system->type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
@ -1127,7 +1168,7 @@ lfreerdp_get_pixel(void *bits, int width, int height, int bpp,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
src8 = (tui8 *)bits;
|
|
|
|
src8 = (tui8 *)bits;
|
|
|
|
src8 += y * delta + x * 4;
|
|
|
|
src8 += y * delta + x * 4;
|
|
|
|
pixel = ((int*)(src8))[0];
|
|
|
|
pixel = ((int *)(src8))[0];
|
|
|
|
return pixel;
|
|
|
|
return pixel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1174,7 +1215,7 @@ lfreerdp_set_pixel(int pixel, void *bits, int width, int height, int bpp,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dst8 = (tui8 *)bits;
|
|
|
|
dst8 = (tui8 *)bits;
|
|
|
|
dst8 += y * delta + x * 4;
|
|
|
|
dst8 += y * delta + x * 4;
|
|
|
|
((int*)(dst8))[0] = pixel;
|
|
|
|
((int *)(dst8))[0] = pixel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1225,21 +1266,23 @@ lfreerdp_pointer_new(rdpContext *context,
|
|
|
|
LLOGLN(20, ("lfreerdp_pointer_new:"));
|
|
|
|
LLOGLN(20, ("lfreerdp_pointer_new:"));
|
|
|
|
LLOGLN(20, (" bpp %d", pointer_new->xorBpp));
|
|
|
|
LLOGLN(20, (" bpp %d", pointer_new->xorBpp));
|
|
|
|
LLOGLN(20, (" width %d height %d", pointer_new->colorPtrAttr.width,
|
|
|
|
LLOGLN(20, (" width %d height %d", pointer_new->colorPtrAttr.width,
|
|
|
|
pointer_new->colorPtrAttr.height));
|
|
|
|
pointer_new->colorPtrAttr.height));
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(20, (" lengthXorMask %d lengthAndMask %d",
|
|
|
|
LLOGLN(20, (" lengthXorMask %d lengthAndMask %d",
|
|
|
|
pointer_new->colorPtrAttr.lengthXorMask,
|
|
|
|
pointer_new->colorPtrAttr.lengthXorMask,
|
|
|
|
pointer_new->colorPtrAttr.lengthAndMask));
|
|
|
|
pointer_new->colorPtrAttr.lengthAndMask));
|
|
|
|
|
|
|
|
|
|
|
|
index = pointer_new->colorPtrAttr.cacheIndex;
|
|
|
|
index = pointer_new->colorPtrAttr.cacheIndex;
|
|
|
|
|
|
|
|
|
|
|
|
if (index >= 32)
|
|
|
|
if (index >= 32)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("lfreerdp_pointer_new: pointer index too big"));
|
|
|
|
LLOGLN(0, ("lfreerdp_pointer_new: pointer index too big"));
|
|
|
|
return ;
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (pointer_new->xorBpp == 1 &&
|
|
|
|
if (pointer_new->xorBpp == 1 &&
|
|
|
|
pointer_new->colorPtrAttr.width == 32 &&
|
|
|
|
pointer_new->colorPtrAttr.width == 32 &&
|
|
|
|
pointer_new->colorPtrAttr.height == 32)
|
|
|
|
pointer_new->colorPtrAttr.height == 32)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(10, ("lfreerdp_pointer_new:"));
|
|
|
|
LLOGLN(10, ("lfreerdp_pointer_new:"));
|
|
|
|
mod->pointer_cache[index].hotx = pointer_new->colorPtrAttr.xPos;
|
|
|
|
mod->pointer_cache[index].hotx = pointer_new->colorPtrAttr.xPos;
|
|
|
@ -1256,14 +1299,14 @@ lfreerdp_pointer_new(rdpContext *context,
|
|
|
|
lfreerdp_convert_color_image(dst, 32, 32, 1, 32 / -8,
|
|
|
|
lfreerdp_convert_color_image(dst, 32, 32, 1, 32 / -8,
|
|
|
|
src, 32, 32, 1, 32 / 8);
|
|
|
|
src, 32, 32, 1, 32 / 8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(pointer_new->xorBpp >= 8 &&
|
|
|
|
else if (pointer_new->xorBpp >= 8 &&
|
|
|
|
pointer_new->colorPtrAttr.width == 32 &&
|
|
|
|
pointer_new->colorPtrAttr.width == 32 &&
|
|
|
|
pointer_new->colorPtrAttr.height == 32)
|
|
|
|
pointer_new->colorPtrAttr.height == 32)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bytes_per_pixel = (pointer_new->xorBpp + 7) / 8;
|
|
|
|
bytes_per_pixel = (pointer_new->xorBpp + 7) / 8;
|
|
|
|
bits_per_pixel = pointer_new->xorBpp;
|
|
|
|
bits_per_pixel = pointer_new->xorBpp;
|
|
|
|
LLOGLN(10, ("lfreerdp_pointer_new: bpp %d Bpp %d", bits_per_pixel,
|
|
|
|
LLOGLN(10, ("lfreerdp_pointer_new: bpp %d Bpp %d", bits_per_pixel,
|
|
|
|
bytes_per_pixel));
|
|
|
|
bytes_per_pixel));
|
|
|
|
mod->pointer_cache[index].hotx = pointer_new->colorPtrAttr.xPos;
|
|
|
|
mod->pointer_cache[index].hotx = pointer_new->colorPtrAttr.xPos;
|
|
|
|
mod->pointer_cache[index].hoty = pointer_new->colorPtrAttr.yPos;
|
|
|
|
mod->pointer_cache[index].hoty = pointer_new->colorPtrAttr.yPos;
|
|
|
|
mod->pointer_cache[index].bpp = bits_per_pixel;
|
|
|
|
mod->pointer_cache[index].bpp = bits_per_pixel;
|
|
|
@ -1278,7 +1321,7 @@ lfreerdp_pointer_new(rdpContext *context,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("lfreerdp_pointer_new: error bpp %d width %d height %d index: %d",
|
|
|
|
LLOGLN(0, ("lfreerdp_pointer_new: error bpp %d width %d height %d index: %d",
|
|
|
|
pointer_new->xorBpp, pointer_new->colorPtrAttr.width,
|
|
|
|
pointer_new->xorBpp, pointer_new->colorPtrAttr.width,
|
|
|
|
pointer_new->colorPtrAttr.height,index));
|
|
|
|
pointer_new->colorPtrAttr.height, index));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mod->server_set_pointer_ex(mod, mod->pointer_cache[index].hotx,
|
|
|
|
mod->server_set_pointer_ex(mod, mod->pointer_cache[index].hotx,
|
|
|
@ -1314,14 +1357,14 @@ lfreerdp_pointer_cached(rdpContext *context,
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
static void DEFAULT_CC
|
|
|
|
static void DEFAULT_CC
|
|
|
|
lfreerdp_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb)
|
|
|
|
lfreerdp_polygon_cb(rdpContext *context, POLYGON_CB_ORDER *polygon_cb)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("lfreerdp_polygon_sc called:- not supported!!!!!!!!!!!!!!!!!!!!"));
|
|
|
|
LLOGLN(0, ("lfreerdp_polygon_sc called:- not supported!!!!!!!!!!!!!!!!!!!!"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
static void DEFAULT_CC
|
|
|
|
static void DEFAULT_CC
|
|
|
|
lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
|
|
|
lfreerdp_polygon_sc(rdpContext *context, POLYGON_SC_ORDER *polygon_sc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct mod *mod;
|
|
|
|
struct mod *mod;
|
|
|
|
int i, npoints;
|
|
|
|
int i, npoints;
|
|
|
@ -1331,11 +1374,12 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
|
|
|
|
|
|
|
|
|
|
|
mod = ((struct mod_context *)context)->modi;
|
|
|
|
mod = ((struct mod_context *)context)->modi;
|
|
|
|
LLOGLN(10, ("lfreerdp_polygon_sc :%d(points) %d(color) %d(fillmode) "
|
|
|
|
LLOGLN(10, ("lfreerdp_polygon_sc :%d(points) %d(color) %d(fillmode) "
|
|
|
|
"%d(bRop) %d(cbData) %d(x) %d(y)",
|
|
|
|
"%d(bRop) %d(cbData) %d(x) %d(y)",
|
|
|
|
polygon_sc->nDeltaEntries, polygon_sc->brushColor,
|
|
|
|
polygon_sc->nDeltaEntries, polygon_sc->brushColor,
|
|
|
|
polygon_sc->fillMode, polygon_sc->bRop2,
|
|
|
|
polygon_sc->fillMode, polygon_sc->bRop2,
|
|
|
|
polygon_sc->cbData, polygon_sc->xStart,
|
|
|
|
polygon_sc->cbData, polygon_sc->xStart,
|
|
|
|
polygon_sc->yStart));
|
|
|
|
polygon_sc->yStart));
|
|
|
|
|
|
|
|
|
|
|
|
if (polygon_sc->nDeltaEntries == 3)
|
|
|
|
if (polygon_sc->nDeltaEntries == 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
server_bpp = mod->inst->settings->color_depth;
|
|
|
|
server_bpp = mod->inst->settings->color_depth;
|
|
|
@ -1349,6 +1393,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
|
|
|
points[i + 1].x = 0; // polygon_sc->points[i].x;
|
|
|
|
points[i + 1].x = 0; // polygon_sc->points[i].x;
|
|
|
|
points[i + 1].y = 0; // polygon_sc->points[i].y;
|
|
|
|
points[i + 1].y = 0; // polygon_sc->points[i].y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fgcolor = convert_color(server_bpp, client_bpp,
|
|
|
|
fgcolor = convert_color(server_bpp, client_bpp,
|
|
|
|
polygon_sc->brushColor, mod->colormap);
|
|
|
|
polygon_sc->brushColor, mod->colormap);
|
|
|
|
|
|
|
|
|
|
|
@ -1358,10 +1403,10 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
|
|
|
mod->server_set_pen(mod, 1, 1); // style, width
|
|
|
|
mod->server_set_pen(mod, 1, 1); // style, width
|
|
|
|
// TODO replace with correct brush; this is a workaround
|
|
|
|
// TODO replace with correct brush; this is a workaround
|
|
|
|
// This workaround handles the text cursor in microsoft word.
|
|
|
|
// This workaround handles the text cursor in microsoft word.
|
|
|
|
mod->server_draw_line(mod,polygon_sc->xStart,polygon_sc->yStart,polygon_sc->xStart,polygon_sc->yStart+points[2].y);
|
|
|
|
mod->server_draw_line(mod, polygon_sc->xStart, polygon_sc->yStart, polygon_sc->xStart, polygon_sc->yStart + points[2].y);
|
|
|
|
// mod->server_fill_rect(mod, points[0].x, points[0].y,
|
|
|
|
// mod->server_fill_rect(mod, points[0].x, points[0].y,
|
|
|
|
// points[0].x-points[3].x, points[0].y-points[2].y);
|
|
|
|
// points[0].x-points[3].x, points[0].y-points[2].y);
|
|
|
|
// mod->server_set_brush(mod,); // howto use this on our indata??
|
|
|
|
// mod->server_set_brush(mod,); // howto use this on our indata??
|
|
|
|
mod->server_set_opcode(mod, 0xcc);
|
|
|
|
mod->server_set_opcode(mod, 0xcc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -1372,7 +1417,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
static void DEFAULT_CC
|
|
|
|
static void DEFAULT_CC
|
|
|
|
lfreerdp_synchronize(rdpContext* context)
|
|
|
|
lfreerdp_synchronize(rdpContext *context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct mod *mod;
|
|
|
|
struct mod *mod;
|
|
|
|
mod = ((struct mod_context *)context)->modi;
|
|
|
|
mod = ((struct mod_context *)context)->modi;
|
|
|
@ -1488,22 +1533,24 @@ lfreerdp_pre_connect(freerdp *instance)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(10, ("Special PerformanceFlags changed"));
|
|
|
|
LLOGLN(10, ("Special PerformanceFlags changed"));
|
|
|
|
instance->settings->performance_flags = PERF_DISABLE_WALLPAPER |
|
|
|
|
instance->settings->performance_flags = PERF_DISABLE_WALLPAPER |
|
|
|
|
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
|
|
|
|
PERF_DISABLE_FULLWINDOWDRAG | PERF_DISABLE_MENUANIMATIONS |
|
|
|
|
PERF_DISABLE_THEMING;
|
|
|
|
PERF_DISABLE_THEMING;
|
|
|
|
// | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS;
|
|
|
|
// | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
instance->settings->compression = 0;
|
|
|
|
instance->settings->compression = 0;
|
|
|
|
instance->settings->ignore_certificate = 1;
|
|
|
|
instance->settings->ignore_certificate = 1;
|
|
|
|
|
|
|
|
|
|
|
|
// Multi Monitor Settings
|
|
|
|
// Multi Monitor Settings
|
|
|
|
instance->settings->num_monitors = mod->client_info.monitorCount;
|
|
|
|
instance->settings->num_monitors = mod->client_info.monitorCount;
|
|
|
|
|
|
|
|
|
|
|
|
for (index = 0; index < mod->client_info.monitorCount; index++)
|
|
|
|
for (index = 0; index < mod->client_info.monitorCount; index++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
instance->settings->monitors[index].x = mod->client_info.minfo[index].left;
|
|
|
|
instance->settings->monitors[index].x = mod->client_info.minfo[index].left;
|
|
|
|
instance->settings->monitors[index].y = mod->client_info.minfo[index].top;
|
|
|
|
instance->settings->monitors[index].y = mod->client_info.minfo[index].top;
|
|
|
|
instance->settings->monitors[index].width = mod->client_info.minfo[index].right;
|
|
|
|
instance->settings->monitors[index].width = mod->client_info.minfo[index].right;
|
|
|
|
instance->settings->monitors[index].height = mod->client_info.minfo[index].bottom;
|
|
|
|
instance->settings->monitors[index].height = mod->client_info.minfo[index].bottom;
|
|
|
|
instance->settings->monitors[index].is_primary = mod->client_info.minfo[index].is_primary;
|
|
|
|
instance->settings->monitors[index].is_primary = mod->client_info.minfo[index].is_primary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
instance->update->BeginPaint = lfreerdp_begin_paint;
|
|
|
|
instance->update->BeginPaint = lfreerdp_begin_paint;
|
|
|
@ -1552,7 +1599,7 @@ lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
|
|
|
int index;
|
|
|
|
int index;
|
|
|
|
struct mod *mod;
|
|
|
|
struct mod *mod;
|
|
|
|
struct rail_window_state_order wso;
|
|
|
|
struct rail_window_state_order wso;
|
|
|
|
UNICONV* uniconv;
|
|
|
|
UNICONV *uniconv;
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(10, ("lrail_WindowCreate:"));
|
|
|
|
LLOGLN(10, ("lrail_WindowCreate:"));
|
|
|
|
uniconv = freerdp_uniconv_new();
|
|
|
|
uniconv = freerdp_uniconv_new();
|
|
|
@ -1567,7 +1614,7 @@ lrail_WindowCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
wso.title_info = freerdp_uniconv_in(uniconv,
|
|
|
|
wso.title_info = freerdp_uniconv_in(uniconv,
|
|
|
|
window_state->titleInfo.string, window_state->titleInfo.length);
|
|
|
|
window_state->titleInfo.string, window_state->titleInfo.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(10, ("lrail_WindowCreate: %s", wso.title_info));
|
|
|
|
LLOGLN(10, ("lrail_WindowCreate: %s", wso.title_info));
|
|
|
@ -1693,7 +1740,7 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct mod *mod;
|
|
|
|
struct mod *mod;
|
|
|
|
struct rail_notify_state_order rnso;
|
|
|
|
struct rail_notify_state_order rnso;
|
|
|
|
UNICONV* uniconv;
|
|
|
|
UNICONV *uniconv;
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(10, ("lrail_NotifyIconCreate:"));
|
|
|
|
LLOGLN(10, ("lrail_NotifyIconCreate:"));
|
|
|
|
uniconv = freerdp_uniconv_new();
|
|
|
|
uniconv = freerdp_uniconv_new();
|
|
|
@ -1704,19 +1751,20 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
|
|
|
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_TIP)
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_TIP)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rnso.tool_tip = freerdp_uniconv_in(uniconv,
|
|
|
|
rnso.tool_tip = freerdp_uniconv_in(uniconv,
|
|
|
|
notify_icon_state->toolTip.string, notify_icon_state->toolTip.length);
|
|
|
|
notify_icon_state->toolTip.string, notify_icon_state->toolTip.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP)
|
|
|
|
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rnso.infotip.timeout = notify_icon_state->infoTip.timeout;
|
|
|
|
rnso.infotip.timeout = notify_icon_state->infoTip.timeout;
|
|
|
|
rnso.infotip.flags = notify_icon_state->infoTip.flags;
|
|
|
|
rnso.infotip.flags = notify_icon_state->infoTip.flags;
|
|
|
|
rnso.infotip.text = freerdp_uniconv_in(uniconv,
|
|
|
|
rnso.infotip.text = freerdp_uniconv_in(uniconv,
|
|
|
|
notify_icon_state->infoTip.text.string,
|
|
|
|
notify_icon_state->infoTip.text.string,
|
|
|
|
notify_icon_state->infoTip.text.length);
|
|
|
|
notify_icon_state->infoTip.text.length);
|
|
|
|
rnso.infotip.title = freerdp_uniconv_in(uniconv,
|
|
|
|
rnso.infotip.title = freerdp_uniconv_in(uniconv,
|
|
|
|
notify_icon_state->infoTip.title.string,
|
|
|
|
notify_icon_state->infoTip.title.string,
|
|
|
|
notify_icon_state->infoTip.title.length);
|
|
|
|
notify_icon_state->infoTip.title.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
rnso.state = notify_icon_state->state;
|
|
|
|
rnso.state = notify_icon_state->state;
|
|
|
|