From ea68934b8e3374d03e876f56a1637663de351cb7 Mon Sep 17 00:00:00 2001 From: laptabrok Date: Thu, 13 Jun 2019 10:48:11 +0300 Subject: [PATCH] Work around problems with wxGLCanvas resizing under macOS 10.14.5 This OS update has broken resizing of NSOpenGLView, which worked correctly up until to 10.14.4. Work around it by preventing the default implementation of update from being executed. It's not clear why should it help with the problem, but it does. Closes https://github.com/wxWidgets/wxWidgets/pull/1354 Closes #18402. --- src/osx/cocoa/glcanvas.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/osx/cocoa/glcanvas.mm b/src/osx/cocoa/glcanvas.mm index 59c572e73b..540505fe57 100644 --- a/src/osx/cocoa/glcanvas.mm +++ b/src/osx/cocoa/glcanvas.mm @@ -149,6 +149,18 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *GLAttrs, impl->doCommandBySelector(aSelector, self, _cmd); } +// We intentionally don't call [super update], so suppress the warning about it. +wxCLANG_WARNING_SUPPRESS(objc-missing-super-calls) + +- (void) update +{ + // Prevent the base class code from breaking resizing on macOS 10.14.5 + // (this is not necessary on the older versions, but doesn't seem to do any + // harm there neither). +} + +wxCLANG_WARNING_RESTORE(objc-missing-super-calls) + @end bool wxGLCanvas::DoCreate(wxWindow *parent,