Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-02-15 17:53:21 +0000
committerLakshmi P Shanmugam2021-04-27 19:50:36 +0000
commit30413b8028c38e4a25d3a56636b21514fd39ed5f (patch)
treec991092052bc093ae1256baf6cb2b69b101e555c
parent7d938b6772ce129e0bd82b55c9f602744fc2ea84 (diff)
downloadeclipse.platform.swt-30413b8028c38e4a25d3a56636b21514fd39ed5f.tar.gz
eclipse.platform.swt-30413b8028c38e4a25d3a56636b21514fd39ed5f.tar.xz
eclipse.platform.swt-30413b8028c38e4a25d3a56636b21514fd39ed5f.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 (cherry picked from commit f739d6defa67a01edd5217b536951276e10f6c4d) Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/178525 Tested-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com> Reviewed-by: Lakshmi P Shanmugam <lshanmug@in.ibm.com>
-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 2d0b168cda..ead53832ab 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
@@ -941,6 +941,19 @@ void pageUp(long /*int*/ id, long /*int*/ sel, long /*int*/ 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 /*int*/ id, long /*int*/ sel, long /*int*/ 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 f8f23717b5..dc51364509 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
@@ -4192,7 +4192,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