[PATCH 0/1] MR4374: win32u: Find the correct dib driver in windrv_CreateDC().
push_dc_driver() places drivers based on their priorities, so the newly created driver is not necessary on top. Thus in windrv_CreateDC(), find_dc_driver() should be used to find the dib driver instead of assuming the dib driver is the top driver, which could be the path driver because it has a higher priority. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4374
From: Zhiyi Zhang <zzhang(a)codeweavers.com> push_dc_driver() places drivers based on their priorities, so the newly created driver is not necessary on top. Thus in windrv_CreateDC(), find_dc_driver() should be used to find the dib driver instead of assuming the dib driver is the top driver, which could be the path driver because it has a higher priority. --- dlls/win32u/dibdrv/dc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/win32u/dibdrv/dc.c b/dlls/win32u/dibdrv/dc.c index 87e637553da..09749d80e72 100644 --- a/dlls/win32u/dibdrv/dc.c +++ b/dlls/win32u/dibdrv/dc.c @@ -871,15 +871,18 @@ static BOOL windrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom, static BOOL windrv_CreateDC( PHYSDEV *dev, LPCWSTR device, LPCWSTR output, const DEVMODEW *devmode ) { struct windrv_physdev *physdev = calloc( 1, sizeof(*physdev) ); + PHYSDEV dibdrv; + DC *dc; if (!physdev) return FALSE; - if (!dib_driver.pCreateDC( dev, NULL, NULL, NULL )) { free( physdev ); return FALSE; } - physdev->dibdrv = get_dibdrv_pdev( *dev ); + dc = get_physdev_dc( *dev ); + dibdrv = find_dc_driver( dc, &dib_driver ); + physdev->dibdrv = get_dibdrv_pdev( dibdrv ); push_dc_driver( dev, &physdev->dev, &window_driver ); return TRUE; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4374
participants (2)
-
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)