xfreerdp-client: reset scale

This commit is contained in:
C-o-r-E 2013-05-08 19:18:06 -04:00
parent f749352ede
commit 5ef672a2d3
2 changed files with 10 additions and 0 deletions

View File

@ -1520,6 +1520,15 @@ double freerdp_client_get_scale(xfInfo* xfi)
return xfi->scale;
}
void freerdp_client_reset_scale(xfInfo* xfi)
{
xfi->scale = 1.0;
XResizeWindow(xfi->display, xfi->window->handle, xfi->orig_width * xfi->scale, xfi->orig_height * xfi->scale);
IFCALL(xfi->client->OnResizeWindow, xfi->instance, xfi->orig_width * xfi->scale, xfi->orig_height * xfi->scale);
xf_draw_screen_scaled(xfi);
}
int freerdp_client_global_init()
{
setlocale(LC_ALL, "");

View File

@ -245,6 +245,7 @@ DWORD xf_exit_code_from_disconnect_reason(DWORD reason);
#define cfInfo xfInfo
FREERDP_API double freerdp_client_get_scale(xfInfo* xfi);
FREERDP_API void freerdp_client_reset_scale(xfInfo* xfi);
FREERDP_API int freerdp_client_global_init();
FREERDP_API int freerdp_client_global_uninit();