Skip to content

Commit 5dc1f62

Browse files
committed
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 7d718fe commit 5dc1f62

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 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

@@ -3679,7 +3679,7 @@ public void setRedraw (boolean redraw) {
36793679
private boolean embedsWin32Control () {
36803680
if (this instanceof Browser browser) {
36813681
// The Edge browser embeds webView2
3682-
return "edge".equals(browser.getBrowserType());
3682+
return "edge".equals(browser.getBrowserType()) && browser.isVisible() && !browser.isDisposed();
36833683
}
36843684

36853685
if (this instanceof OleClientSite) {

0 commit comments

Comments
 (0)