Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-02-15 17:53:21 +0000
committerLakshmi Shanmugam2021-02-15 17:53:21 +0000
commitf739d6defa67a01edd5217b536951276e10f6c4d (patch)
tree50d339dad18a7af9e12bb6705a6894ecd37f1489
parentbbfbcf9977f7dde1b87f9d551254c9e6a42bfdc2 (diff)
downloadeclipse.platform.swt-f739d6defa67a01edd5217b536951276e10f6c4d.tar.gz
eclipse.platform.swt-f739d6defa67a01edd5217b536951276e10f6c4d.tar.xz
eclipse.platform.swt-f739d6defa67a01edd5217b536951276e10f6c4d.zip
Bug 567132 - Big Sur rendering: text shrinks in Preferences tree when
filter string entered NSView.setNeedsDisplay() applies only to the view to which it is sent. When Control.setRedraw(true) is called on a Composite, call setNeedsDisplay() on the views of the children too. Change-Id: Ia460a71a84c7b76204690eb9b4bec26b10e1ee77
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java13
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java4
2 files changed, 16 insertions, 1 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 241a2818cf..af27d9abfe 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
@@ -945,6 +945,19 @@ void pageUp(long id, long sel, long sender) {
}
@Override
+void redrawWidget(NSView view, boolean redrawChildren) {
+ super.redrawWidget(view, redrawChildren);
+ if (redrawChildren) {
+ Control[] _getChildren = _getChildren();
+ for (Control child : _getChildren) {
+ if (child != null && !child.isDisposed () && child.isVisible()) {
+ child.redrawWidget(child.view, redrawChildren);
+ }
+ }
+ }
+}
+
+@Override
void reflectScrolledClipView (long id, long sel, long aClipView) {
if ((state & CANVAS) != 0) return;
super.reflectScrolledClipView (id, sel, aClipView);
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 cbe0ad8d07..12c6633de6 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
@@ -4166,7 +4166,9 @@ public void setRedraw (boolean redraw) {
if (redraw) {
if (--drawCount == 0) {
invalidateVisibleRegion ();
- redrawWidget(topView (), true);
+ NSView topView = topView ();
+ redrawWidget(topView, true);
+ if (view.id != topView.id) redrawWidget(view, true);
}
} else {
if (drawCount == 0) {

Back to the top