Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-02-15 17:53:21 +0000
committerLakshmi P Shanmugam2021-05-31 13:19:52 +0000
commit0819e072beb5f43aec4e8f4846dad9f47d043bc4 (patch)
tree705170ad1b2ece4d527ad2ee9625e37c85b8334d
parentde18fa2257fd88a6fbd733d510314a9ca1e47260 (diff)
downloadeclipse.platform.swt-0819e072beb5f43aec4e8f4846dad9f47d043bc4.tar.gz
eclipse.platform.swt-0819e072beb5f43aec4e8f4846dad9f47d043bc4.tar.xz
eclipse.platform.swt-0819e072beb5f43aec4e8f4846dad9f47d043bc4.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/+/180990 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 ef7256a2b0..8ede4b3231 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
@@ -949,6 +949,19 @@ void reflectScrolledClipView (long /*int*/ id, long /*int*/ sel, long /*int*/ aC
}
@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 releaseChildren (boolean destroy) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
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 e5d25cc582..52bce0d98d 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
@@ -4162,7 +4162,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