diff --git a/patches/gdi32-PtInRegion/0001-gdi32-Add-back-the-extents-test.patch b/patches/gdi32-PtInRegion/0001-gdi32-Add-back-the-extents-test.patch new file mode 100644 index 00000000..733fa0b2 --- /dev/null +++ b/patches/gdi32-PtInRegion/0001-gdi32-Add-back-the-extents-test.patch @@ -0,0 +1,29 @@ +From df1a6386d4aed6c2ed9e4e455e92cf99d2823002 Mon Sep 17 00:00:00 2001 +From: Huw Davies +Date: Fri, 8 Jul 2016 15:57:36 +0100 +Subject: gdi32: Add back the extents test. + +Spotted by Sebastian Lackner. + +Signed-off-by: Huw Davies +--- + dlls/gdi32/region.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c +index cea2dab..db21c02 100644 +--- a/dlls/gdi32/region.c ++++ b/dlls/gdi32/region.c +@@ -1038,7 +1038,8 @@ BOOL WINAPI PtInRegion( HRGN hrgn, INT x, INT y ) + + if ((obj = GDI_GetObjPtr( hrgn, OBJ_REGION ))) + { +- region_find_pt( obj, x, y, &ret ); ++ if (obj->numRects > 0 && is_in_rect( &obj->extents, x, y )) ++ region_find_pt( obj, x, y, &ret ); + GDI_ReleaseObj( hrgn ); + } + return ret; +-- +2.8.0 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 384e0e89..6c459921 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -148,6 +148,7 @@ patch_enable_all () enable_gdi32_Lazy_Font_Initialization="$1" enable_gdi32_MultiMonitor="$1" enable_gdi32_Path_Metafile="$1" + enable_gdi32_PtInRegion="$1" enable_gdi32_Symbol_Truetype_Font="$1" enable_gdiplus_GdipCreateMetafileFromStream="$1" enable_gdiplus_Grayscale_PNG="$1" @@ -620,6 +621,9 @@ patch_enable () gdi32-Path_Metafile) enable_gdi32_Path_Metafile="$2" ;; + gdi32-PtInRegion) + enable_gdi32_PtInRegion="$2" + ;; gdi32-Symbol_Truetype_Font) enable_gdi32_Symbol_Truetype_Font="$2" ;; @@ -3670,6 +3674,18 @@ if test "$enable_gdi32_Path_Metafile" -eq 1; then ) >> "$patchlist" fi +# Patchset gdi32-PtInRegion +# | +# | Modified files: +# | * dlls/gdi32/region.c +# | +if test "$enable_gdi32_PtInRegion" -eq 1; then + patch_apply gdi32-PtInRegion/0001-gdi32-Add-back-the-extents-test.patch + ( + echo '+ { "Huw Davies", "gdi32: Add back the extents test.", 1 },'; + ) >> "$patchlist" +fi + # Patchset gdi32-Symbol_Truetype_Font # | # | This patchset fixes the following Wine bugs: