Merge pull request #1711 from zhangzl2013/wfreerdp

wfreerdp run-time fix.
This commit is contained in:
Marc-André Moreau 2014-03-05 11:27:32 -05:00
commit bb47eb3604
8 changed files with 19 additions and 14 deletions

View File

@ -34,7 +34,11 @@ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${STATIC_MODULE_NAME})
set(ENTRY_POINT_NAME "${STATIC_MODULE_CHANNEL}_${${STATIC_MODULE}_CLIENT_ENTRY}")
set(ENTRY_POINT_IMPORT "extern void ${ENTRY_POINT_NAME}();")
if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL "VirtualChannelEntry")
set(ENTRY_POINT_IMPORT "extern BOOL VCAPITYPE ${ENTRY_POINT_NAME}(PCHANNEL_ENTRY_POINTS);")
else()
set(ENTRY_POINT_IMPORT "extern void ${ENTRY_POINT_NAME}();")
endif()
set(${STATIC_ENTRY}_IMPORTS "${${STATIC_ENTRY}_IMPORTS}\n${ENTRY_POINT_IMPORT}")
set(${STATIC_ENTRY}_TABLE "${${STATIC_ENTRY}_TABLE}\n\t{ \"${STATIC_MODULE_CHANNEL}\", ${ENTRY_POINT_NAME} },")
endif()

View File

@ -464,7 +464,7 @@ int cliprdr_client_format_data_response(CliprdrClientContext* context, CLIPRDR_F
/* cliprdr is always built-in */
#define VirtualChannelEntry cliprdr_VirtualChannelEntry
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
cliprdrPlugin* cliprdr;
CliprdrClientContext* context;

View File

@ -407,7 +407,7 @@ int drdynvc_get_version(DrdynvcClientContext* context)
/* drdynvc is always built-in */
#define VirtualChannelEntry drdynvc_VirtualChannelEntry
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
drdynvcPlugin* _p;
DrdynvcClientContext* context;

View File

@ -501,7 +501,7 @@ int rail_server_get_appid_response(RailClientContext* context, RAIL_GET_APPID_RE
/* rail is always built-in */
#define VirtualChannelEntry rail_VirtualChannelEntry
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
railPlugin* rail;
RailClientContext* context;

View File

@ -989,7 +989,7 @@ static VOID VCAPITYPE rdpdr_virtual_channel_init_event(LPVOID pInitHandle, UINT
/* rdpdr is always built-in */
#define VirtualChannelEntry rdpdr_VirtualChannelEntry
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
rdpdrPlugin* rdpdr;

View File

@ -1065,7 +1065,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event(LPVOID pInitHandle, UINT
/* rdpsnd is always built-in */
#define VirtualChannelEntry rdpsnd_VirtualChannelEntry
int VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
{
rdpsndPlugin* rdpsnd;

View File

@ -136,11 +136,6 @@ static int button_paint(Button* button, HDC hdc)
static Button* floatbar_create_button(FloatBar* floatbar, int type, int resid, int resid_act, int x, int y, int h, int w)
{
Button *button;
HDC hDC;
HDC hMemDC;
HBITMAP hBitmap;
HBITMAP hOldBitmap;
BITMAP bm;
button = (Button *)malloc(sizeof(Button));

View File

@ -236,7 +236,8 @@ BOOL wf_pre_connect(freerdp* instance)
settings->GlyphSupportLevel = GLYPH_SUPPORT_NONE;
wfc->fullscreen = settings->Fullscreen;
wfc->fs_toggle = 1;
if (wfc->fullscreen)
wfc->fs_toggle = 1;
wfc->sw_gdi = settings->SoftwareGdi;
wfc->clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
@ -258,7 +259,7 @@ BOOL wf_pre_connect(freerdp* instance)
desktopHeight = (GetSystemMetrics(SM_CYSCREEN) * wfc->percentscreen) / 100;
settings->DesktopHeight = desktopHeight;
}
if (wfc->fullscreen)
{
if (settings->UseMultimon)
@ -273,6 +274,10 @@ BOOL wf_pre_connect(freerdp* instance)
}
}
/* FIXME: desktopWidth has a limitation that it should be divisible by 4,
* otherwise the screen will crash when connecting to an XP desktop.*/
desktopWidth = (desktopWidth + 3) & (~3);
if (desktopWidth != settings->DesktopWidth)
{
freerdp_set_param_uint32(settings, FreeRDP_DesktopWidth, desktopWidth);
@ -444,7 +449,8 @@ BOOL wf_post_connect(freerdp* instance)
freerdp_channels_post_connect(instance->context->channels, instance);
wf_cliprdr_init(wfc, instance->context->channels);
floatbar_window_create(wfc);
if (wfc->fullscreen)
floatbar_window_create(wfc);
return TRUE;
}