fix: reduce LSPTextHover resize flicker#1449
fix: reduce LSPTextHover resize flicker#1449sebthom wants to merge 2 commits intoeclipse-lsp4e:mainfrom
Conversation
|
|
||
| if (!"complete".equals(safeEvaluate(browser, "return document.readyState"))) { //$NON-NLS-1$ //$NON-NLS-2$ | ||
| UI.getDisplay().timerExec(200, () -> updateBrowserSize(browser)); | ||
| UI.getDisplay().timerExec(50, () -> updateBrowserSize(browser)); |
There was a problem hiding this comment.
I think that until we solve #1396, lowering this will increase the exceptions, so I would leave this for later. I think most likelz the other changes are enough. What do you think?
There was a problem hiding this comment.
In the case where I see the resize flicker it only gets considerably improved if I reduce the value to 50ms or lower.
There was a problem hiding this comment.
I can try to address the SWTException issue as part of this PR too.
There was a problem hiding this comment.
I added a second commit that should allow faster reschedules of updateBrowserSize without throwing the SWTExceptions
There was a problem hiding this comment.
Thanks for addressing the exceptions. I think that even though the code will not throw the SWTException, if it happens, the dialog will not have the proper size, which not good from the user point of view. I will try to put aside some time till the end of the week to implement the solution I suggested #1396.
There was a problem hiding this comment.
Well, I cannot reproduce the exception. But if it occurs a new resize attempt will be done 20ms later so this should result in a correct size.
| updateBrowserSize(browser, 1); | ||
| } | ||
|
|
||
| private void updateBrowserSize(final Browser browser, final int attempt) { |
There was a problem hiding this comment.
@sebthom , can you rebase your PR? Now that I think I have solved the problem with safeEvaluate returning exceptions, I think you can go back to your original attempt which was much simpler.
Fixes #1445