<AWT Dev> [9] Review request for 8170386: JLightweightFrame content can miss paint events on Windows

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Nov 29 15:24:34 UTC 2016


On 29.11.16 17:35, Semyon Sadetsky wrote:
> Paint event may be missed by the JLightweightFrame on Windows platform
> when it is resized consequently to the same size because the latter sets
> paintPainding flag .

 From what place the Paint will be posted after the call to setBounds()? 
In case of normal native components this event will be posted from 
native code after the size of the native component will be changed. But 
how it works in case of JLightweightFrame? At least 
COMPONENT_MOVED/COMPONENT_RESIZED are posted manually from the reshape() 
method, probably we should do the same for the PAIN event as well? In 
this case our optimization which coalesce PAINT events will work and the 
sequence of setBounds() will produce only one repaint() action.

> The fix overrides WComponentPeer#setBounds() method in
> WLightweightFramePeer to clears paintPainding flag.

-- 
Best regards, Sergey.


More information about the awt-dev mailing list