From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/opengl.c | 2 +- dlls/winex11.drv/window.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 5cacb1d9649..3fcad8a4a00 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1098,7 +1098,7 @@ static struct gl_drawable *create_gl_drawable( HWND hwnd, const struct glx_pixel RECT rect; int width, height;
- NtUserGetClientRect( hwnd, &rect, get_win_monitor_dpi( hwnd ) ); + NtUserGetClientRect( hwnd, &rect, NtUserGetDpiForWindow( hwnd ) ); width = min( max( 1, rect.right ), 65535 ); height = min( max( 1, rect.bottom ), 65535 );
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index de4e93b54ee..3774234d45a 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1603,6 +1603,7 @@ Window create_client_window( HWND hwnd, const XVisualInfo *visual, Colormap colo XSetWindowAttributes attr; Window client_window, parent_window; int x, y, cx, cy; + RECT client_rect;
if (!data) { @@ -1624,8 +1625,10 @@ Window create_client_window( HWND hwnd, const XVisualInfo *visual, Colormap colo
x = data->rects.client.left - data->rects.visible.left; y = data->rects.client.top - data->rects.visible.top; - cx = min( max( 1, data->rects.client.right - data->rects.client.left ), 65535 ); - cy = min( max( 1, data->rects.client.bottom - data->rects.client.top ), 65535 ); + + NtUserGetClientRect( hwnd, &client_rect, NtUserGetDpiForWindow( hwnd ) ); + cx = min( max( 1, client_rect.right - client_rect.left ), 65535 ); + cy = min( max( 1, client_rect.bottom - client_rect.top ), 65535 );
XSync( gdi_display, False ); /* make sure whole_window is known from gdi_display */ if (offscreen || !(parent_window = data->whole_window)) parent_window = dummy_parent;