Bug 570251 - [Mac][BigSur] Content Assist icons not drawn correctly on
BigSur

Call redraw(int, int, int, int, rect) on child controls.
NSView.setNeedsDisplay(rect) applies only to the view to which it is sent. When Control.redraw() is called on a Composite, call
setNeedsDisplay(rect) on the
views of the children too.

Change-Id: I2b4795937bb132d657f9197594ea1fa72d6b7551
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180642
Reviewed-by: Niraj Modi <niraj.modi@in.ibm.com>
Reviewed-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
Tested-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index 556eb74..63ca0c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -958,6 +958,25 @@
 }
 
 @Override
+public void redraw(int x, int y, int width, int height, boolean all) {
+	super.redraw(x, y, width, height, all);
+	if (all) {
+		Control[] children = _getChildren();
+		for (Control child : children) {
+			if (child != null && !child.isDisposed () && child.isVisible()) {
+				NSRect rect = new NSRect();
+				rect.x = x;
+				rect.y = y;
+				rect.width = width;
+				rect.height = height;
+				rect = view.convertRect_toView_(rect, child.view);
+				child.redraw((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height, all);
+			}
+		}
+	}
+}
+
+@Override
 void reflectScrolledClipView (long id, long sel, long aClipView) {
 	if ((state & CANVAS) != 0) return;
 	super.reflectScrolledClipView (id, sel, aClipView);