Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Flickering in Embedded Apps #1588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amartya4256
Copy link
Contributor

@amartya4256 amartya4256 commented Nov 11, 2024

This PR contributes to fixing the flicker issue in SashLayout whenever an embedded app is present inside it. The fix disallows the setredraw on controls if they contain any embedded application as their descendant. There's an issue open https://bugs.eclipse.org/bugs/show_bug.cgi?id=558392 for a long time for the resizing of the sashlayout. The current way of performing layout on mouse move works fine for eclipse widgets by calling setRedraw to false which freezes the state of UI and performing a re-layout and then setting redraw to true leading to a smooth transition of the Sashlayout when its borders are dragged by mouse but it is not the same for external Embedded applications.

The embedded applications, e.g. webview 2, excel, etc, use a different renderer because of which whenever setRedraw is set to false, the whole portion where it was drawn goes blank white and when its set back, the apps are visible again, leading to a flicker effect.

One possible solution is to never allow this setredraw to be set back and forth when there's a child with embedded application present and visible. This PR implements the same approach disallowing setRedraw to be enforcedin this case. Even if it is not called from SashLayout, if a client sets it to false, it will lead to the disappearance of the application from the display, which is not desirable. So, the approach is to only allow it when the embedded applications are either not visible or not present.

The solution is not perfect but it definitely feels better as compared to the flickering effect. It definitely brings back a shaky effect on the min/max button as mentioned in the bug above while resizing but only when embedded apps are visible. However, this effect is also visible in these scenarios by default: #1122 (comment) and also when you resize the shell.

contributes to #1122

This commit contributes to fixing the flicker issue in SashLayout
whenever an embedded app is present inside it. The fix disallows the
setredraw of the parents if they contains any embedded application as
their descendants.

contributes to eclipse-platform#1122
Copy link
Contributor

Test Results

   483 files  ±0     483 suites  ±0   8m 22s ⏱️ ±0s
 4 095 tests ±0   4 085 ✅ ±0   7 💤 ±0  3 ❌ ±0 
16 173 runs  ±0  16 080 ✅ ±0  90 💤 ±0  3 ❌ ±0 

For more details on these failures, see this check.

Results for commit 5da0508. ± Comparison against base commit d9d9bf0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant