Fix #4864: Register pointer cache after PostConnect is called
With #4950 client side pointer implementation was made optional. This addresses an issue that each client had to call pointer_cache_register_callbacks on its own.
This commit is contained in:
parent
b216520d5b
commit
666ef4ab34
@ -375,7 +375,6 @@ static BOOL android_post_connect(freerdp* instance)
|
|||||||
instance->update->BeginPaint = android_begin_paint;
|
instance->update->BeginPaint = android_begin_paint;
|
||||||
instance->update->EndPaint = android_end_paint;
|
instance->update->EndPaint = android_end_paint;
|
||||||
instance->update->DesktopResize = android_desktop_resize;
|
instance->update->DesktopResize = android_desktop_resize;
|
||||||
pointer_cache_register_callbacks(update);
|
|
||||||
freerdp_callback("OnSettingsChanged", "(JIII)V", (jlong)instance,
|
freerdp_callback("OnSettingsChanged", "(JIII)V", (jlong)instance,
|
||||||
settings->DesktopWidth, settings->DesktopHeight,
|
settings->DesktopWidth, settings->DesktopHeight,
|
||||||
settings->ColorDepth);
|
settings->ColorDepth);
|
||||||
|
@ -204,7 +204,6 @@ BOOL df_post_connect(freerdp* instance)
|
|||||||
instance->update->BeginPaint = df_begin_paint;
|
instance->update->BeginPaint = df_begin_paint;
|
||||||
instance->update->EndPaint = df_end_paint;
|
instance->update->EndPaint = df_end_paint;
|
||||||
df_keyboard_init();
|
df_keyboard_init();
|
||||||
pointer_cache_register_callbacks(instance->update);
|
|
||||||
df_register_graphics(instance->context->graphics);
|
df_register_graphics(instance->context->graphics);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -944,7 +944,6 @@ BOOL mac_post_connect(freerdp* instance)
|
|||||||
|
|
||||||
gdi = instance->context->gdi;
|
gdi = instance->context->gdi;
|
||||||
view->bitmap_context = mac_create_bitmap_context(instance->context);
|
view->bitmap_context = mac_create_bitmap_context(instance->context);
|
||||||
pointer_cache_register_callbacks(instance->update);
|
|
||||||
graphics_register_pointer(instance->context->graphics, &rdp_pointer);
|
graphics_register_pointer(instance->context->graphics, &rdp_pointer);
|
||||||
/* setup pasteboard (aka clipboard) for copy operations (write only) */
|
/* setup pasteboard (aka clipboard) for copy operations (write only) */
|
||||||
view->pasteboard_wr = [NSPasteboard generalPasteboard];
|
view->pasteboard_wr = [NSPasteboard generalPasteboard];
|
||||||
|
@ -372,7 +372,6 @@ static BOOL wf_post_connect(freerdp* instance)
|
|||||||
instance->update->BeginPaint = wf_begin_paint;
|
instance->update->BeginPaint = wf_begin_paint;
|
||||||
instance->update->DesktopResize = wf_desktop_resize;
|
instance->update->DesktopResize = wf_desktop_resize;
|
||||||
instance->update->EndPaint = wf_end_paint;
|
instance->update->EndPaint = wf_end_paint;
|
||||||
pointer_cache_register_callbacks(instance->update);
|
|
||||||
wf_register_pointer(context->graphics);
|
wf_register_pointer(context->graphics);
|
||||||
|
|
||||||
if (!settings->SoftwareGdi)
|
if (!settings->SoftwareGdi)
|
||||||
|
@ -1274,7 +1274,6 @@ static BOOL xf_post_connect(freerdp* instance)
|
|||||||
update->DesktopResize = xf_hw_desktop_resize;
|
update->DesktopResize = xf_hw_desktop_resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
pointer_cache_register_callbacks(update);
|
|
||||||
update->PlaySound = xf_play_sound;
|
update->PlaySound = xf_play_sound;
|
||||||
update->SetKeyboardIndicators = xf_keyboard_set_indicators;
|
update->SetKeyboardIndicators = xf_keyboard_set_indicators;
|
||||||
update->SetKeyboardImeStatus = xf_keyboard_set_ime_status;
|
update->SetKeyboardImeStatus = xf_keyboard_set_ime_status;
|
||||||
|
@ -258,7 +258,6 @@ static BOOL ios_post_connect(freerdp* instance)
|
|||||||
instance->update->BeginPaint = ios_ui_begin_paint;
|
instance->update->BeginPaint = ios_ui_begin_paint;
|
||||||
instance->update->EndPaint = ios_ui_end_paint;
|
instance->update->EndPaint = ios_ui_end_paint;
|
||||||
instance->update->DesktopResize = ios_ui_resize_window;
|
instance->update->DesktopResize = ios_ui_resize_window;
|
||||||
pointer_cache_register_callbacks(instance->update);
|
|
||||||
[mfi->session performSelectorOnMainThread:@selector(sessionDidConnect)
|
[mfi->session performSelectorOnMainThread:@selector(sessionDidConnect)
|
||||||
withObject:nil waitUntilDone:YES];
|
withObject:nil waitUntilDone:YES];
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <freerdp/log.h>
|
#include <freerdp/log.h>
|
||||||
#include <freerdp/error.h>
|
#include <freerdp/error.h>
|
||||||
#include <freerdp/listener.h>
|
#include <freerdp/listener.h>
|
||||||
|
#include <freerdp/cache/pointer.h>
|
||||||
|
|
||||||
#define TAG FREERDP_TAG("core.connection")
|
#define TAG FREERDP_TAG("core.connection")
|
||||||
|
|
||||||
@ -395,6 +396,8 @@ static BOOL rdp_client_reconnect_channels(rdpRdp* rdp, BOOL redirect)
|
|||||||
if (redirect)
|
if (redirect)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
pointer_cache_register_callbacks(context->update);
|
||||||
|
|
||||||
if (!IFCALLRESULT(FALSE, context->instance->PostConnect, context->instance))
|
if (!IFCALLRESULT(FALSE, context->instance->PostConnect, context->instance))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <freerdp/channels/channels.h>
|
#include <freerdp/channels/channels.h>
|
||||||
#include <freerdp/version.h>
|
#include <freerdp/version.h>
|
||||||
#include <freerdp/log.h>
|
#include <freerdp/log.h>
|
||||||
|
#include <freerdp/cache/pointer.h>
|
||||||
|
|
||||||
#define TAG FREERDP_TAG("core")
|
#define TAG FREERDP_TAG("core")
|
||||||
|
|
||||||
@ -208,6 +209,7 @@ BOOL freerdp_connect(freerdp* instance)
|
|||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
|
pointer_cache_register_callbacks(instance->context->update);
|
||||||
IFCALLRET(instance->PostConnect, status, instance);
|
IFCALLRET(instance->PostConnect, status, instance);
|
||||||
instance->ConnectionCallbackState = CLIENT_STATE_POSTCONNECT_PASSED;
|
instance->ConnectionCallbackState = CLIENT_STATE_POSTCONNECT_PASSED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user