Skip to content

Commit b85d9d2

Browse files
amartya4256fedejeanne
authored andcommitted
Fix Sash Layout Shaking in win32 #62
This commit fixes the check for enabling and disabling the redraw of controls in a sashlayout which leads to a shaky sashlayout on resizing it. contributes to #62 and #127
1 parent a63ba75 commit b85d9d2

File tree

1 file changed

+5
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+5
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3635,8 +3635,8 @@ public void setRedraw (boolean redraw) {
36353635
*
36363636
* https://github.com/eclipse-platform/eclipse.platform.swt/issues/1122
36373637
*/
3638-
boolean isShown = isVisible() && !isDisposed();
3639-
if (!redraw && isShown && embedsWin32Control()) {
3638+
if (!redraw && embedsWin32Control()) {
3639+
drawCount++;
36403640
return;
36413641
}
36423642

@@ -3677,6 +3677,9 @@ public void setRedraw (boolean redraw) {
36773677
}
36783678

36793679
private boolean embedsWin32Control () {
3680+
if (this.isDisposed() || !this.isVisible()) {
3681+
return false;
3682+
}
36803683
if (this instanceof Browser browser) {
36813684
// The Edge browser embeds webView2
36823685
return "edge".equals(browser.getBrowserType());

0 commit comments

Comments
 (0)