[PATCH] winemac: Invalidate cached hasGLDescendant value unconditionally when the view is hidden or unhidden.

Ken Thomases ken at codeweavers.com
Thu Apr 20 20:53:16 CDT 2017


Even if the (un)hidden view doesn't have attached GL contexts itself, its
descendants may.  It doesn't make sense not to check them just because this
view doesn't have GL contexts.

Signed-off-by: Ken Thomases <ken at codeweavers.com>
---
 dlls/winemac.drv/cocoa_window.m | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index af8ebe7..c67dd07 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -617,18 +617,14 @@ - (BOOL) mouseDownCanMoveWindow
     - (void) viewDidHide
     {
         [super viewDidHide];
-        if ([self hasGLContext])
-            [self invalidateHasGLDescendant];
+        [self invalidateHasGLDescendant];
     }
 
     - (void) viewDidUnhide
     {
         [super viewDidUnhide];
-        if ([self hasGLContext])
-        {
-            [self updateGLContexts:YES];
-            [self invalidateHasGLDescendant];
-        }
+        [self updateGLContexts:YES];
+        [self invalidateHasGLDescendant];
     }
 
     - (void) completeText:(NSString*)text
-- 
2.10.2




More information about the wine-patches mailing list