Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-03-30 16:03:51 +0000
committerLakshmi P Shanmugam2021-05-24 09:56:47 +0000
commitf6c68495ee7b34a64b4f0ef8fca3364c076d4c7d (patch)
tree149150b2465075f4a3ddc2fb535756def90f31e8
parentd7a286e60072c32809520fea05659c1724b99390 (diff)
downloadeclipse.platform.swt-f6c68495ee7b34a64b4f0ef8fca3364c076d4c7d.tar.gz
eclipse.platform.swt-f6c68495ee7b34a64b4f0ef8fca3364c076d4c7d.tar.xz
eclipse.platform.swt-f6c68495ee7b34a64b4f0ef8fca3364c076d4c7d.zip
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>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java19
1 files changed, 19 insertions, 0 deletions
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 556eb74a72..63ca0c928e 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 @@ void redrawWidget(NSView view, boolean redrawChildren) {
}
@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);

Back to the top