Skip to content

Commit

Permalink
[channel,rail] keep reference to rdpContext
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Oct 23, 2023
1 parent 22e2dc6 commit a50a515
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions channels/rail/client/rail_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,8 @@ FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS p

context->handle = (void*)rail;
context->custom = NULL;
context->rdpcontext = pEntryPointsEx->context;

context->ClientExecute = rail_client_execute;
context->ClientActivate = rail_client_activate;
context->ClientSystemParam = rail_client_system_param;
Expand Down
9 changes: 2 additions & 7 deletions client/common/client_rails.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ UINT client_rail_server_start_cmd(RailClientContext* context)
RAIL_EXEC_ORDER exec = { 0 };
RAIL_SYSPARAM_ORDER sysparam = { 0 };
RAIL_CLIENT_STATUS_ORDER clientStatus = { 0 };
rdpClientContext* ctx;
rdpSettings* settings;

WINPR_ASSERT(context);
WINPR_ASSERT(context->rdpcontext);

ctx = (rdpClientContext*)context->custom;
WINPR_ASSERT(ctx);

settings = ctx->context.settings;
WINPR_ASSERT(settings);
const rdpSettings* settings = context->rdpcontext->settings;

clientStatus.flags = TS_RAIL_CLIENTSTATUS_ALLOWLOCALMOVESIZE;

Expand Down
2 changes: 2 additions & 0 deletions include/freerdp/client/rail.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ extern "C"
pcRailOnOpen OnOpen;
pcRailClientTextScale ClientTextScale;
pcRailClientCaretBlinkRate ClientCaretBlinkRate;

rdpContext* rdpcontext;
};

FREERDP_API UINT client_rail_server_start_cmd(RailClientContext* context);
Expand Down

0 comments on commit a50a515

Please sign in to comment.