diff options
| author | Lakshmi Shanmugam | 2021-02-15 17:53:21 +0000 |
|---|---|---|
| committer | Lakshmi P Shanmugam | 2021-05-25 16:06:47 +0000 |
| commit | be21569a98997c3d17ee79f443b676ace78fbf2a (patch) | |
| tree | a10fee1ce551a4759b75e856bb4b8d94296cd661 | |
| parent | 294c9873ca2595da3c00921739f2082cda39e9ef (diff) | |
| download | eclipse.platform.swt-be21569a98997c3d17ee79f443b676ace78fbf2a.tar.gz eclipse.platform.swt-be21569a98997c3d17ee79f443b676ace78fbf2a.tar.xz eclipse.platform.swt-be21569a98997c3d17ee79f443b676ace78fbf2a.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>
(cherry picked from commit 30413b8028c38e4a25d3a56636b21514fd39ed5f)
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/180981
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java | 13 | ||||
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java | 4 |
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 ca07d3644a..421db402e0 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 @@ -950,6 +950,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 0b8c35b965..ae8e70e50d 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 @@ -4149,7 +4149,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) { |
