-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8270874: JFrame paint artifacts when dragged from standard monitor to HiDPI monitor #6339
Conversation
👋 Welcome back serb! A progress list of the required criteria for merging this PR into |
Please correct my understanding. Does this refined repaint logic apply even for overlapping Windows? What happens when 2 windows are overlapping and we move top window slowly? Any performance/power impact? |
Initially, this code was used just for that, to make a fast blit of the content from the Swing back buffer to the native window, when some other window is moved over the Swing and damaged it (the fix for the "grey rectangle" JDK-4967886). But since Windows Vista the Windows itself maintain such doublebuffer and the content is not damaged when windows overlap, so this callback is not called. |
Thanks for the clarification |
@mrserb 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 93 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 |
/integrate |
Going to push as commit 03473b4.
Your commit was automatically rebased without conflicts. |
The bug occurs more often if initially the window is moved partly outside of the first screen(let's name this part as the invisible part), and then slowly moved to the second screen where that invisible part became visible on the second screen.
The problem is how we try to repaint the frame. The Windows send us coordinates to repaint in the device space, if the width/height values are less than a unit in the user's space, we round it to the empty rectangle and skip it.
Solution: request to repaint the smallest non-empty bounding box in the user's space around the region of pixels.
Workaround: repaint the whole window on the component resize/move event or at the end of the drag.
Notes:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6339/head:pull/6339
$ git checkout pull/6339
Update a local copy of the PR:
$ git checkout pull/6339
$ git pull https://git.openjdk.java.net/jdk pull/6339/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6339
View PR using the GUI difftool:
$ git pr show -t 6339
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6339.diff