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.
From: Zhiyi Zhang zzhang@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; }