[PATCH v2] darwin: Fix non-Metal build

Brendan Shanks bshanks at codeweavers.com
Thu Dec 30 23:44:33 CST 2021


> On Dec 28, 2021, at 8:22 AM, Dean Greer <gcenx83 at gmail.com> wrote:
> 
> Tested this on an actual 10.9 install (10.8 is harder to get setup) and still the same issue nothing gets displayed other than the bar as shown in one of the prior emails.

I built and ran Wine on 10.13, and I get the same result. The regression commit is "winemac.drv: Remove now unused -[WineContentView drawRect:].”, 3f845b34deada0dd58e3674119af47ce85851c24.

The problem seems to be that WineContentView updateLayer isn’t being called for some reason. What’s weird is, if I add back an empty implementation of drawRect: like this, it does work.

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index d0672b7fb06..1ee582e6b59 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -477,6 +477,10 @@ - (BOOL) isFlipped
         return YES;
     }
 
+    - (void) drawRect:(NSRect)rect
+    {
+    }
+
     - (BOOL) wantsUpdateLayer
     {
         return YES /*!_everHadGLContext*/;


Dean, does this change make a difference for you on 10.9?

And Chip, any idea why this would make a difference or if this is the right thing to do? drawRect: isn’t even being called, it’s existence alone seems to make things work.

(Note that this is on a 2010 MacBook which is about as old a machine as 10.13 supported. In particular, it has a GeForce 320M which doesn’t support Metal, but I don’t think this should make a difference. I’ll test out a 10.13 machine with Metal to be sure.)

Brendan


More information about the wine-devel mailing list