[Minimize/Maximize and Restore the window] shows black ui for a moment. [message #1808389] |
Sun, 23 June 2019 13:36 |
Missing name Mising name Messages: 43 Registered: July 2011 |
Member |
|
|
Hello, I'm writing this message from Japan.
Sorry for my bad English.
[Minimize/Maximize and Restore the window] shows a black ui for a moment ( if the window contains a lot of Controls, Widgets). And it causes a little flicker (Even in a high performance PC).
This seems a bit ugly. So I'd like to prevent this behavior in my app.
This behavior also occurs in eclipse 4.9 which I'm currently using.
I think it is related with the SWT source code.
I'd like to show quickly loadable simple loading screen or simply use double buffer.
But I don't know where to tweak.
Is it possible by overriding some methods of Control or Composite?
I have tried SWT.DOUBLE_BUFFERED style in constructors but no luck.
Thank you very much in advance.
Best regards.
--My environments---
Windows 10
eclipse4.9 and using its SWT+JFace jar libraries.
[Updated on: Tue, 25 June 2019 19:37] Report message to a moderator
|
|
|
|
|
|
Re: [Minimize and Restore the window] shows black ui for a moment. [message #1822082 is a reply to message #1808897] |
Wed, 26 February 2020 23:37 |
Missing name Mising name Messages: 43 Registered: July 2011 |
Member |
|
|
I tried debugging the SWT code.
And I found that at the point of maximizing the window, button shows up normally.
But when Composite calls Control#fillBackground > OS.FillRect (which is native code), the black rectangle image appears.
The brush color was #F0F0F0 (COLOR_BTNFACE), so not black.
I don't know why FillRect leaves a weird black rectangle.
Other Windows Application does not show black rectangle like this, so this is the SWT's problem I think.
---org.eclipse.swt.widgets.Control.java
void fillBackground (long hDC, int pixel, RECT rect) {
if (rect.left > rect.right || rect.top > rect.bottom) return;
OS.FillRect (hDC, rect, findBrush (pixel, OS.BS_SOLID));
}
[Updated on: Wed, 26 February 2020 23:38] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03547 seconds