Imported Upstream version 5.20.0.244

Former-commit-id: 072cb2ad8e168458108970d47c6dafefb04475eb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-03-08 08:37:50 +00:00
parent 4b878ebc4f
commit f4a99b8ed9
56 changed files with 90 additions and 58 deletions

View File

@@ -218,7 +218,8 @@ class GtkPackage (GitHubPackage):
# https://devdiv.visualstudio.com/DevDiv/_workitems/edit/737323
'patches/gtk/gtk-nsview-subview-focus-fixes.patch',
'patches/gtk/gtk-nsview-focus-tabbing.patch',
'patches/gtk/popup-combo-box-with-arrows.patch'
'patches/gtk/popup-combo-box-with-arrows.patch',
'patches/gtk/0001-prevent-gdk-quartz-window-delegate-replacement.patch'
])
def prep(self):

View File

@@ -0,0 +1,21 @@
diff --git a/gdk/quartz/GdkQuartzWindow.c b/gdk/quartz/GdkQuartzWindow.c
index e8e0de5c7..435c856be 100644
--- a/gdk/quartz/GdkQuartzWindow.c
+++ b/gdk/quartz/GdkQuartzWindow.c
@@ -259,6 +259,16 @@
return [super makeFirstResponder:responder];
}
+-(void)setDelegate:(id<NSWindowDelegate>)delegate
+{
+ if ([super delegate] == nil) {
+ [super setDelegate:delegate];
+ } else {
+ // If we allow the window delegate to be replaced, everything breaks.
+ g_critical ("Setting a delegate on GdkQuartzWindow is forbidden, because everything will break.");
+ }
+}
+
-(id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag screen:(NSScreen *)screen
{
self = [super initWithContentRect:contentRect