neutrinordp: indentation fixes
This commit is contained in:
parent
a42cb4842c
commit
80b91c0a7b
@ -55,6 +55,7 @@ verifyColorMap(struct mod *mod)
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
LLOGLN(0, ("The colormap is all NULL"));
|
||||
}
|
||||
|
||||
@ -116,44 +117,55 @@ lxrdp_connect(struct mod *mod)
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"PREECONNECTERROR");
|
||||
break;
|
||||
|
||||
case UNDEFINEDCONNECTERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"UNDEFINEDCONNECTERROR");
|
||||
break;
|
||||
|
||||
case POSTCONNECTERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"POSTCONNECTERROR");
|
||||
break;
|
||||
|
||||
case DNSERROR:
|
||||
g_snprintf(buf, 128, "The DNS system generated an error");
|
||||
break;
|
||||
|
||||
case DNSNAMENOTFOUND:
|
||||
g_snprintf(buf, 128, "The DNS system could not find the "
|
||||
"specified name");
|
||||
break;
|
||||
|
||||
case CONNECTERROR:
|
||||
g_snprintf(buf, 128, "A general connect error was returned");
|
||||
break;
|
||||
|
||||
case MCSCONNECTINITIALERROR:
|
||||
g_snprintf(buf, 128, "The error code from connect is "
|
||||
"MCSCONNECTINITIALERROR");
|
||||
break;
|
||||
|
||||
case TLSCONNECTERROR:
|
||||
g_snprintf(buf, 128, "Error in TLS handshake");
|
||||
break;
|
||||
|
||||
case AUTHENTICATIONERROR:
|
||||
g_snprintf(buf, 128, "Authentication error check your password "
|
||||
"and username");
|
||||
break;
|
||||
|
||||
case INSUFFICIENTPRIVILEGESERROR:
|
||||
g_snprintf(buf, 128, "Insufficent privileges on target server");
|
||||
break;
|
||||
|
||||
default:
|
||||
g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
|
||||
connectErrorCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
log_message(LOG_LEVEL_INFO, buf);
|
||||
mod->server_msg(mod, buf, 0);
|
||||
}
|
||||
@ -198,6 +210,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
switch (msg)
|
||||
{
|
||||
case 15: /* key down */
|
||||
|
||||
/* Before we handle the first character we synchronize
|
||||
capslock and numlock. */
|
||||
/* We collect the state during the first synchronize
|
||||
@ -208,11 +221,14 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo);
|
||||
mod->bool_keyBoardSynced = 1;
|
||||
}
|
||||
|
||||
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
||||
break;
|
||||
|
||||
case 16: /* key up */
|
||||
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
|
||||
break;
|
||||
|
||||
case 17: /* Synchronize */
|
||||
LLOGLN(11, ("Synchronized event handled : %d", param1));
|
||||
/* In some situations the Synchronize event come to early.
|
||||
@ -221,11 +237,14 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
Without this fix numlock and capslock can come
|
||||
out of sync. */
|
||||
mod->inst->input->SynchronizeEvent(mod->inst->input, param1);
|
||||
|
||||
if (!mod->bool_keyBoardSynced)
|
||||
{
|
||||
mod->keyBoardLockInfo = param1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 100: /* mouse move */
|
||||
LLOGLN(12, ("mouse move %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -233,6 +252,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_MOVE;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 101: /* left button up */
|
||||
LLOGLN(12, ("left button up %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -240,6 +260,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON1;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 102: /* left button down */
|
||||
LLOGLN(12, ("left button down %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -247,6 +268,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON1 | PTR_FLAGS_DOWN;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 103: /* right button up */
|
||||
LLOGLN(12, ("right button up %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -254,6 +276,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON2;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 104: /* right button down */
|
||||
LLOGLN(12, ("right button down %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -261,6 +284,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON2 | PTR_FLAGS_DOWN;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 105: /* middle button up */
|
||||
LLOGLN(12, ("middle button up %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -268,6 +292,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON3;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
case 106: /* middle button down */
|
||||
LLOGLN(12, ("middle button down %d %d", param1, param2));
|
||||
x = param1;
|
||||
@ -275,18 +300,23 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
flags = PTR_FLAGS_BUTTON3 | PTR_FLAGS_DOWN;
|
||||
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
|
||||
break;
|
||||
|
||||
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:
|
||||
LLOGLN(10, ("Invalidate request sent from client"));
|
||||
x = (param1 >> 16) & 0xffff;
|
||||
@ -295,6 +325,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
cy = (param2 >> 0) & 0xffff;
|
||||
mod->inst->SendInvalidate(mod->inst, -1, x, y, cx, cy);
|
||||
break;
|
||||
|
||||
case 0x5555:
|
||||
chanid = LOWORD(param1);
|
||||
flags = HIWORD(param1);
|
||||
@ -303,6 +334,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
|
||||
total_size = (int)param4;
|
||||
|
||||
LLOGLN(12, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags));
|
||||
|
||||
if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels))
|
||||
{
|
||||
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:
|
||||
mod->inst->SendChannelData(mod->inst, lchid, (tui8 *)data, total_size);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* end */
|
||||
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_valid = 0;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
/* start */
|
||||
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);
|
||||
mod->chan_buf_valid += size;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* middle */
|
||||
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;
|
||||
|
||||
default:
|
||||
LLOGLN(0, ("Unhandled message type in eventhandler %d", msg));
|
||||
break;
|
||||
@ -588,8 +624,10 @@ lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap)
|
||||
if (bd->compressed)
|
||||
{
|
||||
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)){
|
||||
bd->height, bd->bitmapLength, server_bpp, server_bpp))
|
||||
{
|
||||
LLOGLN(0, ("Failure to decompress the bitmap"));
|
||||
}
|
||||
}
|
||||
@ -669,6 +707,7 @@ lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt)
|
||||
{
|
||||
LLOGLN(0, ("Warning same color on both bg and fg"));
|
||||
}
|
||||
|
||||
mod->server_set_mixmode(mod, 1);
|
||||
mod->server_set_opcode(mod, patblt->bRop);
|
||||
mod->server_set_fgcolor(mod, fgcolor);
|
||||
@ -825,6 +864,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
||||
opRight = glyph_index->opRight;
|
||||
opBottom = glyph_index->opBottom;
|
||||
#if 1
|
||||
|
||||
/* workarounds for freerdp not using fOpRedundant in
|
||||
glyph.c::update_gdi_glyph_index */
|
||||
if (glyph_index->fOpRedundant)
|
||||
@ -834,6 +874,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
|
||||
opRight = glyph_index->bkRight;
|
||||
opBottom = glyph_index->bkBottom;
|
||||
}
|
||||
|
||||
#endif
|
||||
mod->server_draw_text(mod, glyph_index->cacheId, glyph_index->flAccel,
|
||||
glyph_index->fOpRedundant,
|
||||
@ -1232,11 +1273,13 @@ lfreerdp_pointer_new(rdpContext *context,
|
||||
pointer_new->colorPtrAttr.lengthAndMask));
|
||||
|
||||
index = pointer_new->colorPtrAttr.cacheIndex;
|
||||
|
||||
if (index >= 32)
|
||||
{
|
||||
LLOGLN(0, ("lfreerdp_pointer_new: pointer index too big"));
|
||||
return ;
|
||||
}
|
||||
|
||||
if (pointer_new->xorBpp == 1 &&
|
||||
pointer_new->colorPtrAttr.width == 32 &&
|
||||
pointer_new->colorPtrAttr.height == 32)
|
||||
@ -1336,6 +1379,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
polygon_sc->fillMode, polygon_sc->bRop2,
|
||||
polygon_sc->cbData, polygon_sc->xStart,
|
||||
polygon_sc->yStart));
|
||||
|
||||
if (polygon_sc->nDeltaEntries == 3)
|
||||
{
|
||||
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].y = 0; // polygon_sc->points[i].y;
|
||||
}
|
||||
|
||||
fgcolor = convert_color(server_bpp, client_bpp,
|
||||
polygon_sc->brushColor, mod->colormap);
|
||||
|
||||
@ -1492,11 +1537,13 @@ lfreerdp_pre_connect(freerdp *instance)
|
||||
PERF_DISABLE_THEMING;
|
||||
// | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS;
|
||||
}
|
||||
|
||||
instance->settings->compression = 0;
|
||||
instance->settings->ignore_certificate = 1;
|
||||
|
||||
// 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;
|
||||
@ -1707,6 +1754,7 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
|
||||
rnso.tool_tip = freerdp_uniconv_in(uniconv,
|
||||
notify_icon_state->toolTip.string, notify_icon_state->toolTip.length);
|
||||
}
|
||||
|
||||
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP)
|
||||
{
|
||||
rnso.infotip.timeout = notify_icon_state->infoTip.timeout;
|
||||
|
Loading…
Reference in New Issue
Block a user