<AWT Dev> [8] Review Request: 8001472 api/java_awt/Window/indexTGF_* tests fail because expected colors aren't equal

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Dec 6 04:28:32 PST 2013


On 06.12.2013 16:15, Anthony Petrov wrote:
> Hi Sergey,
>
> Note that XClearWindow() won't generate any Expose events for the 
> window, so that the contents of it won't be repainted automatically 
> after a call to XWindow.xSetBackground(). Is the code calling this 
> method aware of that and forces the repainting elsewhere? If not, 
> shouldn't we call XClearArea(display, w, 0, 0, 0, 0, True) instead?
XComponent.setBackground() calls repaint at the end, which paint all 
necessary staff, except background.
sequence of calls:
XComponent.setBackground()
     XWindow->xSetBackground()
         XlibWrapper.XSetWindowBackground()
         XlibWrapper.XClearWindow
XComponent.repaint()
>
> -- 
> best regards,
> Anthony
>
> On 12/07/2013 03:31 PM, Sergey Bylokhov wrote:
>> Hello.
>> Please review the fix for jdk 8.
>> According to the documentation of XSetWindowBackground [1]:
>> "Changing the background does not cause the window contents to be
>> changed. To repaint the window and its background, use XClearWindow."
>>
>> This error has big history as it was unstable. The behavior changes from
>> update2update depending on that we generated UPDATE event or not, 
>> because
>> by default Container.update in distinguishing from Container.paint does
>> clearRect().
>> After 7090424 we began to generate less paints and a problem became more
>> visible.
>>
>> [1] http://www.kodkast.com/unix-command/XSetWindowBackground
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8001472
>> Webrev can be found at: 
>> http://cr.openjdk.java.net/~serb/8001472/webrev.00
>>


-- 
Best regards, Sergey.



More information about the awt-dev mailing list