Ken Thomases : winemac: Fix failure to render OpenGL on macOS 10.14 (Mojave).
Module: wine Branch: stable Commit: add7aa1a3c2028ba59944d4dd0c5d458f7e11115 URL: https://source.winehq.org/git/wine.git/?a=commit;h=add7aa1a3c2028ba59944d4dd... Author: Ken Thomases <ken(a)codeweavers.com> Date: Thu Feb 7 13:57:22 2019 -0600 winemac: Fix failure to render OpenGL on macOS 10.14 (Mojave). For programs linked against the macOS 10.14 SDK, Mojave makes all view hierarchies layer-backed. For views to which OpenGL contexts have been attached this caused a regression where they sometimes failed to render and just remain black. Updating the OpenGL context after the framework has assigned a layer to our view works around the problem. Thanks to Elviss Strazdins on Stack Overflow for the solution <https://stackoverflow.com/a/52938517/1312143>. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 654b27823d6b1aa23ca22290cb1d88194cb980d4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/winemac.drv/cocoa_window.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index e405cda2d2..f43b26b8e3 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -747,6 +747,12 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi [super willRemoveSubview:subview]; } + - (void) setLayer:(CALayer*)newLayer + { + [super setLayer:newLayer]; + [self updateGLContexts]; + } + /* * ---------- NSTextInputClient methods ---------- */
participants (1)
-
Alexandre Julliard