-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8255880: UI of Swing components is not redrawn after their internal state changed #1722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back alitvinov! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
The fix looks reasonable although I am surprised such an issue has existed for what I suppose is a long time. |
|
@alitvinv This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 211 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
Hello Phil. Thank you for review and already approval of the 2nd version of the fix, which has just been pushed in this branch. In the second commit I removed completely "@requires" tag from the regression test by your request. I verified that this test passes on Windows OS, macOS, Linux OS. |
|
/integrate |
|
@alitvinv Since your change was applied there have been 214 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit e8c40ba. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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.
ROOT CAUSE OF THE BUG:
"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:
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
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/1722/head:pull/1722$ git checkout pull/1722