From: Zebediah Figura <zfigura(a)codeweavers.com> --- dlls/winex11.drv/opengl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 783ac5f3a9d..92768267bae 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1687,8 +1687,12 @@ static int glxdrv_wglGetPixelFormat( HDC hdc ) { struct gl_drawable *gl; int ret = 0; + HWND hwnd; - if ((gl = get_gl_drawable( NtUserWindowFromDC( hdc ), hdc ))) + if ((hwnd = NtUserWindowFromDC( hdc ))) + return win32u_get_window_pixel_format( hwnd ); + + if ((gl = get_gl_drawable( NULL, hdc ))) { ret = pixel_format_index( gl->format ); /* Offscreen formats can't be used with traditional WGL calls. -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2217