Skip to content

Commit

Permalink
[client,x11] fix coordinate sign type
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Jan 14, 2025
1 parent 52708ad commit ba424d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions client/X11/xf_rail.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,9 @@ static BOOL xf_rail_window_common(rdpContext* context, const WINDOW_ORDER_INFO*
if (fieldFlags & WINDOW_ORDER_STATE_NEW)
{
if (!appWindow)
appWindow =
xf_rail_add_window(xfc, orderInfo->windowId,
WINPR_ASSERTING_INT_CAST(uint32_t, windowState->windowOffsetX),
WINPR_ASSERTING_INT_CAST(uint32_t, windowState->windowOffsetY),
windowState->windowWidth, windowState->windowHeight, 0xFFFFFFFF);
appWindow = xf_rail_add_window(xfc, orderInfo->windowId, windowState->windowOffsetX,
windowState->windowOffsetY, windowState->windowWidth,
windowState->windowHeight, 0xFFFFFFFF);

if (!appWindow)
return FALSE;
Expand Down Expand Up @@ -1197,7 +1195,7 @@ int xf_rail_uninit(xfContext* xfc, RailClientContext* rail)
return 1;
}

xfAppWindow* xf_rail_add_window(xfContext* xfc, UINT64 id, UINT32 x, UINT32 y, UINT32 width,
xfAppWindow* xf_rail_add_window(xfContext* xfc, UINT64 id, INT32 x, INT32 y, UINT32 width,
UINT32 height, UINT32 surfaceId)
{
xfAppWindow* appWindow = NULL;
Expand All @@ -1213,8 +1211,8 @@ xfAppWindow* xf_rail_add_window(xfContext* xfc, UINT64 id, UINT32 x, UINT32 y, U
appWindow->xfc = xfc;
appWindow->windowId = id;
appWindow->surfaceId = surfaceId;
appWindow->x = WINPR_ASSERTING_INT_CAST(int, x);
appWindow->y = WINPR_ASSERTING_INT_CAST(int, y);
appWindow->x = x;
appWindow->y = y;
appWindow->width = WINPR_ASSERTING_INT_CAST(int, width);
appWindow->height = WINPR_ASSERTING_INT_CAST(int, height);

Expand Down
2 changes: 1 addition & 1 deletion client/X11/xf_rail.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow);
void xf_rail_enable_remoteapp_mode(xfContext* xfc);
void xf_rail_disable_remoteapp_mode(xfContext* xfc);

xfAppWindow* xf_rail_add_window(xfContext* xfc, UINT64 id, UINT32 x, UINT32 y, UINT32 width,
xfAppWindow* xf_rail_add_window(xfContext* xfc, UINT64 id, INT32 x, INT32 y, UINT32 width,
UINT32 height, UINT32 surfaceId);
xfAppWindow* xf_rail_get_window(xfContext* xfc, UINT64 id);

Expand Down

0 comments on commit ba424d7

Please sign in to comment.