neutirnordp: changes for rail proxy

ulab-next
speidy 11 years ago
parent 2360bef91a
commit b8cffeefe1

@ -27,7 +27,7 @@
#ifdef XRDP_DEBUG
#define LOG_LEVEL 99
#else
#define LOG_LEVEL 10
#define LOG_LEVEL 11
#endif
#define LLOG(_level, _args) \
@ -256,11 +256,13 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
case 107: /* wheel up */
flags = PTR_FLAGS_WHEEL | 0x0078;
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
break;
case 108:
break;
case 109: /* wheel down */
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
break;
case 110:
break;
case 200:
@ -277,8 +279,9 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
size = (int)param2;
data = (char *)param3;
total_size = (int)param4;
LLOGLN(12, ("lxrdp_event: client to server flags %d", flags));
LLOGLN(10, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags));
g_hexdump(data, size); // for debugging
if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels))
{
LLOGLN(0, ("lxrdp_event: error chanid %d", chanid));
@ -472,7 +475,7 @@ lfreerdp_begin_paint(rdpContext *context)
{
struct mod *mod;
LLOGLN(10, ("lfreerdp_begin_paint:"));
LLOGLN(12, ("lfreerdp_begin_paint:"));
mod = ((struct mod_context *)context)->modi;
mod->server_begin_update(mod);
}
@ -483,7 +486,7 @@ lfreerdp_end_paint(rdpContext *context)
{
struct mod *mod;
LLOGLN(10, ("lfreerdp_end_paint:"));
LLOGLN(12, ("lfreerdp_end_paint:"));
mod = ((struct mod_context *)context)->modi;
mod->server_end_update(mod);
}
@ -498,7 +501,7 @@ lfreerdp_set_bounds(rdpContext *context, rdpBounds *bounds)
int cx;
int cy;
LLOGLN(10, ("lfreerdp_set_bounds: %p", bounds));
LLOGLN(12, ("lfreerdp_set_bounds: %p", bounds));
mod = ((struct mod_context *)context)->modi;
if (bounds != 0)
@ -715,7 +718,7 @@ lfreerdp_mem_blt(rdpContext *context, MEMBLT_ORDER *memblt)
struct bitmap_item *bi;
mod = ((struct mod_context *)context)->modi;
LLOGLN(10, ("lfreerdp_mem_blt: cacheId %d cacheIndex %d",
LLOGLN(12, ("lfreerdp_mem_blt: cacheId %d cacheIndex %d",
memblt->cacheId, memblt->cacheIndex));
id = memblt->cacheId;
@ -1334,7 +1337,7 @@ static void DEFAULT_CC lfreerdp_syncronize(rdpContext* context)
{
struct mod *mod;
mod = ((struct mod_context *)context)->modi;
LLOGLN(0, ("lfreerdp_synchronize received - not handled"));
LLOGLN(12, ("lfreerdp_synchronize received - not handled"));
}
/******************************************************************************/
@ -1359,8 +1362,8 @@ lfreerdp_pre_connect(freerdp *instance)
while (error == 0)
{
num_chans++;
LLOGLN(10, ("lfreerdp_pre_connect: got channel [%s], flags [0x%8.8x]",
ch_name, ch_flags));
LLOGLN(10, ("lfreerdp_pre_connect: got channel [%s], id [%d], flags [0x%8.8x]",
ch_name, index, ch_flags));
dst_ch_name = instance->settings->channels[index].name;
g_memset(dst_ch_name, 0, 8);
g_snprintf(dst_ch_name, 8, "%s", ch_name);
@ -1389,24 +1392,25 @@ lfreerdp_pre_connect(freerdp *instance)
instance->settings->order_support[NEG_MEM3BLT_INDEX] = 0;
instance->settings->order_support[NEG_MEM3BLT_V2_INDEX] = 0;
instance->settings->bitmapCacheV2NumCells = 3; // 5;
instance->settings->bitmapCacheV2CellInfo[0].numEntries = 0x78; // 600;
instance->settings->bitmapCacheV2CellInfo[0].numEntries = 600; // 0x78;
instance->settings->bitmapCacheV2CellInfo[0].persistent = 0;
instance->settings->bitmapCacheV2CellInfo[1].numEntries = 0x78; // 600;
instance->settings->bitmapCacheV2CellInfo[1].numEntries = 600; //0x78; // 600;
instance->settings->bitmapCacheV2CellInfo[1].persistent = 0;
instance->settings->bitmapCacheV2CellInfo[2].numEntries = 0x150; // 2048;
instance->settings->bitmapCacheV2CellInfo[2].numEntries = 2048; //0x150; // 2048;
instance->settings->bitmapCacheV2CellInfo[2].persistent = 0;
instance->settings->bitmapCacheV2CellInfo[3].numEntries = 0; // 4096;
instance->settings->bitmapCacheV2CellInfo[3].numEntries = 4096; // 4096;
instance->settings->bitmapCacheV2CellInfo[3].persistent = 0;
instance->settings->bitmapCacheV2CellInfo[4].numEntries = 0; // 2048;
instance->settings->bitmapCacheV2CellInfo[4].numEntries = 2048; // 2048;
instance->settings->bitmapCacheV2CellInfo[4].persistent = 0;
// instance->settings->BitmapCacheV3Enabled = FALSE;
instance->settings->bitmap_cache_v3 = 1;
instance->settings->order_support[NEG_MULTIDSTBLT_INDEX] = 0;
instance->settings->order_support[NEG_MULTIPATBLT_INDEX] = 0;
instance->settings->order_support[NEG_MULTISCRBLT_INDEX] = 0;
instance->settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = 0;
instance->settings->order_support[NEG_POLYLINE_INDEX] = 0;
instance->settings->username = g_strdup(mod->username);
instance->settings->password = g_strdup(mod->password);
@ -1417,6 +1421,10 @@ lfreerdp_pre_connect(freerdp *instance)
instance->settings->rail_langbar_supported = 1;
instance->settings->workarea = 1;
instance->settings->performance_flags = PERF_DISABLE_WALLPAPER | PERF_DISABLE_FULLWINDOWDRAG;
instance->settings->num_icon_caches = mod->client_info.wnd_num_icon_caches;
instance->settings->num_icon_cache_entries = mod->client_info.wnd_num_icon_cache_entries;
}
else
{
@ -1429,8 +1437,16 @@ lfreerdp_pre_connect(freerdp *instance)
instance->settings->compression = 0;
instance->settings->ignore_certificate = 1;
// here
//instance->settings->RdpVersion = 4;
// Multi Monitor Settings
instance->settings->num_monitors = mod->client_info.monitorCount;
for (index = 0; index < mod->client_info.monitorCount; index++)
{
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].width = mod->client_info.minfo[index].right;
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->update->BeginPaint = lfreerdp_begin_paint;
instance->update->EndPaint = lfreerdp_end_paint;
@ -1457,6 +1473,7 @@ lfreerdp_pre_connect(freerdp *instance)
instance->update->pointer->PointerNew = lfreerdp_pointer_new;
instance->update->pointer->PointerCached = lfreerdp_pointer_cached;
if ((mod->username[0] != 0) && (mod->password[0] != 0))
{
/* since we have username and password, we can try nla */
@ -1744,6 +1761,7 @@ lfreerdp_post_connect(freerdp *instance)
mod = ((struct mod_context *)(instance->context))->modi;
g_memset(mod->password, 0, sizeof(mod->password));
mod->inst->update->window->WindowCreate = lrail_WindowCreate;
mod->inst->update->window->WindowUpdate = lrail_WindowUpdate;
mod->inst->update->window->WindowDelete = lrail_WindowDelete;
@ -1755,6 +1773,7 @@ lfreerdp_post_connect(freerdp *instance)
mod->inst->update->window->MonitoredDesktop = lrail_MonitoredDesktop;
mod->inst->update->window->NonMonitoredDesktop = lrail_NonMonitoredDesktop;
return 1;
}
@ -1796,7 +1815,8 @@ lfreerdp_receive_channel_data(freerdp *instance, int channelId, uint8 *data,
if (lchid >= 0)
{
LLOGLN(10, ("lfreerdp_receive_channel_data: server to client"));
LLOGLN(10, ("lfreerdp_receive_channel_data: server to client, chanid: %d", lchid));
g_hexdump(data, size); // for debugging
error = mod->server_send_to_channel(mod, lchid, (char *)data, size,
total_size, flags);

Loading…
Cancel
Save