gdkdisplay-win32.c: Don't call ReleaseDC() unnecessarily

The dummy Win32 window that we use to capture display change events and
to create dummy WGL contexts was created with CS_OWNDC, so we really do
not need to (and should not) call ReleaseDC() on the HDC that we
obtained from it, so drop these calls.
This commit is contained in:
Chun-wei Fan
2021-07-19 17:13:53 +08:00
committed by Benjamin Otte
parent bd69d7e23f
commit 4b12dc6547

View File

@@ -664,12 +664,6 @@ gdk_win32_display_dispose (GObject *object)
display_win32->dummy_context_wgl.hglrc = NULL;
}
if (display_win32->dummy_context_wgl.hdc != NULL)
{
ReleaseDC (display_win32->hwnd, display_win32->dummy_context_wgl.hdc);
display_win32->dummy_context_wgl.hdc = NULL;
}
DestroyWindow (display_win32->hwnd);
display_win32->hwnd = NULL;
}