diff --git a/client/Mac/MRDPView.m b/client/Mac/MRDPView.m index c298efe23..dd47304ba 100644 --- a/client/Mac/MRDPView.m +++ b/client/Mac/MRDPView.m @@ -820,6 +820,44 @@ DWORD fixKeyCode(DWORD keyCode, unichar keyChar, enum APPLE_KEYBOARD_TYPE type) mfc->client_width = width; } +void mac_OnChannelConnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e) +{ + rdpSettings* settings = context->settings; + + if (strcmp(e->name, RDPEI_DVC_CHANNEL_NAME) == 0) + { + + } + else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0) + { + if (settings->SoftwareGdi) + gdi_graphics_pipeline_init(context->gdi, (RdpgfxClientContext*) e->pInterface); + } + else if (strcmp(e->name, ENCOMSP_SVC_CHANNEL_NAME) == 0) + { + + } +} + +void mac_OnChannelDisconnectedEventHandler(rdpContext* context, ChannelDisconnectedEventArgs* e) +{ + rdpSettings* settings = context->settings; + + if (strcmp(e->name, RDPEI_DVC_CHANNEL_NAME) == 0) + { + + } + else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0) + { + if (settings->SoftwareGdi) + gdi_graphics_pipeline_uninit(context->gdi, (RdpgfxClientContext*) e->pInterface); + } + else if (strcmp(e->name, ENCOMSP_SVC_CHANNEL_NAME) == 0) + { + + } +} + BOOL mac_pre_connect(freerdp* instance) { rdpSettings* settings; @@ -867,6 +905,12 @@ BOOL mac_pre_connect(freerdp* instance) settings->OrderSupport[NEG_POLYGON_CB_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_SC_INDEX] = FALSE; settings->OrderSupport[NEG_ELLIPSE_CB_INDEX] = FALSE; + + PubSub_SubscribeChannelConnected(instance->context->pubSub, + (pChannelConnectedEventHandler) mac_OnChannelConnectedEventHandler); + + PubSub_SubscribeChannelDisconnected(instance->context->pubSub, + (pChannelDisconnectedEventHandler) mac_OnChannelDisconnectedEventHandler); freerdp_client_load_addins(instance->context->channels, instance->settings); diff --git a/client/Mac/mfreerdp.h b/client/Mac/mfreerdp.h index fa1961951..37eb3b4a6 100644 --- a/client/Mac/mfreerdp.h +++ b/client/Mac/mfreerdp.h @@ -10,11 +10,17 @@ typedef struct mf_context mfContext; #include #include +#include #include #include #include #include +#include +#include +#include +#include + #include #include #include diff --git a/include/freerdp/server/rdpsnd.h b/include/freerdp/server/rdpsnd.h index 3a8c6553c..6aff9087f 100644 --- a/include/freerdp/server/rdpsnd.h +++ b/include/freerdp/server/rdpsnd.h @@ -120,7 +120,6 @@ FREERDP_API RdpsndServerContext* rdpsnd_server_context_new(HANDLE vcm); FREERDP_API void rdpsnd_server_context_reset(RdpsndServerContext *); FREERDP_API void rdpsnd_server_context_free(RdpsndServerContext* context); FREERDP_API HANDLE rdpsnd_server_get_event_handle(RdpsndServerContext *context); -FREERDP_API BOOL rdpsnd_server_handle_messages(RdpsndServerContext *context); FREERDP_API int rdpsnd_server_handle_messages(RdpsndServerContext *context); FREERDP_API BOOL rdpsnd_server_send_formats(RdpsndServerContext* context, wStream* s); diff --git a/server/Mac/mf_input.c b/server/Mac/mf_input.c index d74cd9c26..4165d596c 100644 --- a/server/Mac/mf_input.c +++ b/server/Mac/mf_input.c @@ -353,12 +353,6 @@ void mf_input_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) CGEventPost(kCGHIDEventTap, kbEvent); CFRelease(kbEvent); CFRelease(source); - - /* - if (flags & KBD_FLAGS_EXTENDED) - DEBUG_WARN( "extended "); - DEBUG_WARN( "keypress: down = %d, SCAN=%#0X, VK=%#0X\n", keyDown, code, keymap[code]); - */ } void mf_input_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code) @@ -548,7 +542,6 @@ void mf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) void mf_input_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y) { - DEBUG_WARN( "Unhandled mouse event!!!\n"); /* if ((flags & PTR_XFLAGS_BUTTON1) || (flags & PTR_XFLAGS_BUTTON2)) { diff --git a/winpr/libwinpr/utils/wlog/ImageMessage.c b/winpr/libwinpr/utils/wlog/ImageMessage.c index fcfbbdbdc..a8d2ab979 100644 --- a/winpr/libwinpr/utils/wlog/ImageMessage.c +++ b/winpr/libwinpr/utils/wlog/ImageMessage.c @@ -22,6 +22,7 @@ #endif #include +#include #include "wlog/ImageMessage.h"