fix moving a window shrinks it 14x7 when connect to server 2019 (#8083)

* fix moving a window shrinks it 14x7 when connect to server 2019

Signed-off-by: 2fly2 <wjatchd@163.com>

* use clang-format to apply correct formatting

Signed-off-by: 2fly2 <wjatchd@163.com>

Signed-off-by: 2fly2 <wjatchd@163.com>
This commit is contained in:
2fly2 2022-08-16 20:22:03 +08:00 committed by GitHub
parent 899424e941
commit 8dfadc5885
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,6 @@ void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow)
unsigned int mask;
Window root_window;
Window child_window;
RAIL_WINDOW_MOVE_ORDER windowMove;
rdpInput* input;
WINPR_ASSERT(xfc);
@ -161,6 +160,11 @@ void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow)
input = xfc->common.context.input;
WINPR_ASSERT(input);
if ((appWindow->local_move.direction == _NET_WM_MOVERESIZE_MOVE_KEYBOARD) ||
(appWindow->local_move.direction == _NET_WM_MOVERESIZE_SIZE_KEYBOARD))
{
RAIL_WINDOW_MOVE_ORDER windowMove;
/*
* For keyboard moves send and explicit update to RDP server
*/
@ -174,9 +178,12 @@ void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow)
windowMove.top = appWindow->y - appWindow->resizeMarginTop;
windowMove.right =
appWindow->x + appWindow->width +
appWindow->resizeMarginRight; /* In the update to RDP the position is one past the window */
appWindow
->resizeMarginRight; /* In the update to RDP the position is one past the window */
windowMove.bottom = appWindow->y + appWindow->height + appWindow->resizeMarginBottom;
xfc->rail->ClientWindowMove(xfc->rail, &windowMove);
}
/*
* Simulate button up at new position to end the local move (per RDP spec)
*/