<AWT Dev> RFR: 8255880: UI of Swing components is not redrawn after their internal state changed [v2]

Sergey Bylokhov serb at openjdk.java.net
Mon Dec 14 10:03:55 UTC 2020

On Sun, 13 Dec 2020 23:56:12 GMT, Anton Litvinov <alitvinov at openjdk.org> wrote:

>> Hello colleagues,
>> Could you please review the fix for the bug specific to Linux OS and Solaris OS, which consists in the fact that, if Swing components are changed through standard public API of these components, while the frame containing these components is in "Frame.ICONIFIED" state or in other words minimized, then, when the frame becomes deiconified the UI of the Swing components does not reflect those changes.
>> "javax.swing.RepaintManager.addDirtyRegion0(Container, int, int, int, int)" by design prevents updating regions of containers, when the containers are inside a frame with "Frame.ICONIFIED" state. And at the same time Linux OS specific JDK code does not initiate repaint of the frame, when the frame's peer is notified about change of state from "Frame.ICONIFIED" to other state. More details are available in the bug record.
>> The fix adds code to the method "sun.awt.X11.XFramePeer.handlePropertyNotify(XEvent)" which calls "repaint()" for instance of "XFramePeer", if its state changed from "Frame.ICONIFIED". The fix repeats the approach already existing in macOS specific code, which is in the method "sun.lwawt.LWWindowPeer.notifyIconify(boolean)".
>> Thank you,
>> Anton
> Anton Litvinov has updated the pull request incrementally with one additional commit since the last revision:
>   Removal of required platform restriction from the test

Marked as reviewed by serb (Reviewer).


PR: https://git.openjdk.java.net/jdk/pull/1722

More information about the awt-dev mailing list