This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 49cd7a76958f6e5b21653027930475bd112c989e
Author: Jim Jagielski <[email protected]>
AuthorDate: Mon Nov 16 13:01:04 2026 -0500

    vcl: drop the Difference blend before macOS XOR emulation starts
    
    Going from invert-only to XOR, or setting invert-only twice, left the
    target blending with Difference, so the XOR write-back overwrote it.
---
 main/vcl/aqua/source/gdi/salgdi.cxx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/main/vcl/aqua/source/gdi/salgdi.cxx 
b/main/vcl/aqua/source/gdi/salgdi.cxx
index 738f1ded02..86159aa7ba 100644
--- a/main/vcl/aqua/source/gdi/salgdi.cxx
+++ b/main/vcl/aqua/source/gdi/salgdi.cxx
@@ -2356,6 +2356,14 @@ void AquaSalGraphics::SetXORMode( bool bSet, bool 
bInvertOnly )
         mnXorMode = 2;
         return;
     }
+    else if( bSet && mnXorMode == 2 )
+    {
+        if( bInvertOnly )
+            return;
+        // the XOR write-back must not be blended with Difference
+        CGContextSetBlendMode( mrContext, kCGBlendModeNormal );
+        mnXorMode = 0;
+    }
 
        if( (mpXorEmulation == NULL) && !bSet )
                return;

Reply via email to