diff --git a/client/X11/xf_interface.c b/client/X11/xf_interface.c index 62e12e397..640735d35 100644 --- a/client/X11/xf_interface.c +++ b/client/X11/xf_interface.c @@ -1684,6 +1684,18 @@ double freerdp_client_get_scale(xfInfo* xfi) return xfi->scale; } +void freerdp_client_set_scale(xfInfo* xfi, double newScale) +{ + xfi->scale = newScale; + + xfi->currentWidth = xfi->originalWidth * xfi->scale; + xfi->currentHeight = xfi->originalHeight * xfi->scale; + + xf_transform_window(xfi); + IFCALL(xfi->client->OnResizeWindow, xfi->instance, xfi->originalWidth * xfi->scale, xfi->originalHeight * xfi->scale); + xf_draw_screen_scaled(xfi, 0, 0, 0, 0, FALSE); +} + int freerdp_client_get_xpan(xfInfo* xfi) { return xfi->offset_x; diff --git a/client/X11/xf_interface.h b/client/X11/xf_interface.h index 217a2e368..f97fc9045 100644 --- a/client/X11/xf_interface.h +++ b/client/X11/xf_interface.h @@ -248,6 +248,7 @@ FREERDP_API int freerdp_client_get_xpan(xfInfo* xfi); FREERDP_API int freerdp_client_get_ypan(xfInfo* xfi); FREERDP_API double freerdp_client_get_scale(xfInfo* xfi); +FREERDP_API void freerdp_client_set_scale(xfInfo* xfi, double newScale); FREERDP_API void freerdp_client_reset_scale(xfInfo* xfi); FREERDP_API int freerdp_client_global_init();