summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2013-05-10 14:58:45 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2013-05-10 14:58:45 -0400
commit9a80949a18eff49434f46c96af608ae42a363d3e (patch)
treeeb926902f70df05ebe9ec37408d6b05c06d2002c /bundles
parentc660730bd911adbdda866a00c1ace2ec715d90d6 (diff)
downloadeclipse.platform.swt-9a80949a18eff49434f46c96af608ae42a363d3e.tar.gz
eclipse.platform.swt-9a80949a18eff49434f46c96af608ae42a363d3e.tar.xz
eclipse.platform.swt-9a80949a18eff49434f46c96af608ae42a363d3e.zip
Bug 407555 - StackOverflowError in SWT widgets on Mac OS
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java7
4 files changed, 16 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 7500c9fb46..4452ba50d6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -3979,6 +3979,10 @@
<arg swt_gen="true"></arg>
<retval swt_gen="true" swt_java_type="NSView"></retval>
</method>
+ <method selector="isDescendantOf:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
<method selector="isFlipped" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
index 7dd64ab18e..853ff943f6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -178,6 +178,10 @@ public NSView initWithFrame(NSRect frameRect) {
return result == this.id ? this : (result != 0 ? new NSView(result) : null);
}
+public boolean isDescendantOf(NSView aView) {
+ return OS.objc_msgSend_bool(this.id, OS.sel_isDescendantOf_, aView != null ? aView.id : 0);
+}
+
public boolean isFlipped() {
return OS.objc_msgSend_bool(this.id, OS.sel_isFlipped);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index dc3560ee25..83e395e83e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -1438,6 +1438,7 @@ public static final long /*int*/ sel_invalidate = sel_registerName("invalidate")
public static final long /*int*/ sel_invalidateShadow = sel_registerName("invalidateShadow");
public static final long /*int*/ sel_invert = sel_registerName("invert");
public static final long /*int*/ sel_isActive = sel_registerName("isActive");
+public static final long /*int*/ sel_isDescendantOf_ = sel_registerName("isDescendantOf:");
public static final long /*int*/ sel_isDocumentEdited = sel_registerName("isDocumentEdited");
public static final long /*int*/ sel_isDrawingToScreen = sel_registerName("isDrawingToScreen");
public static final long /*int*/ sel_isEmpty = sel_registerName("isEmpty");
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index 946473f8df..d27ffa40f2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -4915,7 +4915,12 @@ public void update () {
void update (boolean all) {
// checkWidget();
- if (display.isPainting.containsObject(view)) return;
+ NSArray isPainting = display.isPainting;
+ if (isPainting.containsObject(view)) return;
+ for (int i = 0, length = (int)/*64*/isPainting.count(); i < length; i++) {
+ NSView view = new NSView(isPainting.objectAtIndex(i));
+ if (view.isDescendantOf(this.view)) return;
+ }
if (isResizing()) return;
Shell shell = getShell();
NSWindow window = shell.deferFlushing && shell.scrolling ? view.window() : null;