Merge pull request #5030 from akallabeth/pointer_cache_optional

Fix #4864: Register pointer cache after PostConnect is called
This commit is contained in:
Martin Fleisz 2018-11-20 10:53:40 +01:00 committed by GitHub
commit 38091fc34e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 5 additions and 6 deletions

View File

@ -375,7 +375,6 @@ static BOOL android_post_connect(freerdp* instance)
instance->update->BeginPaint = android_begin_paint;
instance->update->EndPaint = android_end_paint;
instance->update->DesktopResize = android_desktop_resize;
pointer_cache_register_callbacks(update);
freerdp_callback("OnSettingsChanged", "(JIII)V", (jlong)instance,
settings->DesktopWidth, settings->DesktopHeight,
settings->ColorDepth);

View File

@ -204,7 +204,6 @@ BOOL df_post_connect(freerdp* instance)
instance->update->BeginPaint = df_begin_paint;
instance->update->EndPaint = df_end_paint;
df_keyboard_init();
pointer_cache_register_callbacks(instance->update);
df_register_graphics(instance->context->graphics);
return TRUE;
}

View File

@ -944,7 +944,6 @@ BOOL mac_post_connect(freerdp* instance)
gdi = instance->context->gdi;
view->bitmap_context = mac_create_bitmap_context(instance->context);
pointer_cache_register_callbacks(instance->update);
graphics_register_pointer(instance->context->graphics, &rdp_pointer);
/* setup pasteboard (aka clipboard) for copy operations (write only) */
view->pasteboard_wr = [NSPasteboard generalPasteboard];

View File

@ -372,7 +372,6 @@ static BOOL wf_post_connect(freerdp* instance)
instance->update->BeginPaint = wf_begin_paint;
instance->update->DesktopResize = wf_desktop_resize;
instance->update->EndPaint = wf_end_paint;
pointer_cache_register_callbacks(instance->update);
wf_register_pointer(context->graphics);
if (!settings->SoftwareGdi)

View File

@ -1274,7 +1274,6 @@ static BOOL xf_post_connect(freerdp* instance)
update->DesktopResize = xf_hw_desktop_resize;
}
pointer_cache_register_callbacks(update);
update->PlaySound = xf_play_sound;
update->SetKeyboardIndicators = xf_keyboard_set_indicators;
update->SetKeyboardImeStatus = xf_keyboard_set_ime_status;

View File

@ -258,7 +258,6 @@ static BOOL ios_post_connect(freerdp* instance)
instance->update->BeginPaint = ios_ui_begin_paint;
instance->update->EndPaint = ios_ui_end_paint;
instance->update->DesktopResize = ios_ui_resize_window;
pointer_cache_register_callbacks(instance->update);
[mfi->session performSelectorOnMainThread:@selector(sessionDidConnect)
withObject:nil waitUntilDone:YES];
return TRUE;

View File

@ -37,6 +37,7 @@
#include <freerdp/log.h>
#include <freerdp/error.h>
#include <freerdp/listener.h>
#include <freerdp/cache/pointer.h>
#define TAG FREERDP_TAG("core.connection")
@ -395,6 +396,8 @@ static BOOL rdp_client_reconnect_channels(rdpRdp* rdp, BOOL redirect)
if (redirect)
return TRUE;
pointer_cache_register_callbacks(context->update);
if (!IFCALLRESULT(FALSE, context->instance->PostConnect, context->instance))
return FALSE;

View File

@ -48,6 +48,7 @@
#include <freerdp/channels/channels.h>
#include <freerdp/version.h>
#include <freerdp/log.h>
#include <freerdp/cache/pointer.h>
#define TAG FREERDP_TAG("core")
@ -208,6 +209,7 @@ BOOL freerdp_connect(freerdp* instance)
if (status)
{
pointer_cache_register_callbacks(instance->context->update);
IFCALLRET(instance->PostConnect, status, instance);
instance->ConnectionCallbackState = CLIENT_STATE_POSTCONNECT_PASSED;