Community
Participate
Working Groups
Created attachment 281947 [details] SSSCE simple example Hello, I'm new here. Thank you very much in advance. [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. I have tried SWT.DOUBLE_BUFFERED style in constructors but no luck. I attached a SSSCE. --- 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)); }
Created attachment 281948 [details] Example Image
My Original Forum post. https://www.eclipse.org/forums/index.php/t/1099428/
I removed OS.WS_CLIPCHILDREN from Composite.java. And it looks far better now. Although I don't know it may or may not cause other bugs. I made small changes in Composite.java Sorry not posting diff. ---Composite.java int widgetStyle () { /* Force clipping of children by setting WS_CLIPCHILDREN */ return super.widgetStyle (); //| OS.WS_CLIPCHILDREN; } ---Composite.java int newBits = oldBits;// | OS.WS_CLIPSIBLINGS | OS.WS_CLIPCHILDREN;