Alexandre Julliard : wined3d: Make sure we are still using the correct window before setting pixel format.

Alexandre Julliard julliard at winehq.org
Tue Jul 18 13:58:54 CDT 2017


Module: wine
Branch: master
Commit: 548382e634c7c4df5fe0ae433cdfad916f7e5784
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=548382e634c7c4df5fe0ae433cdfad916f7e5784

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jul 18 10:03:51 2017 +0200

wined3d: Make sure we are still using the correct window before setting pixel format.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index b5b788f..f9c95ba 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1102,6 +1102,9 @@ static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BO
     if (dc == context->hdc && context->hdc_is_private && context->hdc_has_format)
         return TRUE;
 
+    if (dc == context->hdc && !context->hdc_is_private && WindowFromDC(dc) != context->win_handle)
+        return FALSE;
+
     current = gl_info->gl_ops.wgl.p_wglGetPixelFormat(dc);
     if (current == format) goto success;
 




More information about the wine-cvs mailing list