[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Integrated: 8270874: JFrame paint artifacts when dragged from standard monitor to HiDPI monitor
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2021-11-18 18:28:43
Message-ID: HHLa-hUXsMGst9zt7_NxlKrGb2W7St1EguBQQC2kDW0=.9827297f-9e84-44cc-b46b-9d878a3c70cd () github ! com
[Download RAW message or body]

On Wed, 10 Nov 2021 18:45:12 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> 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:
> * It is not reproducible(at least much less often) when d3d is enabled because the \
> d3d pipeline sends repaint events more often (example \
>                 https://github.com/openjdk/jdk/pull/6064). That hides the current \
>                 issue.
> * It started to be reproducible during the drag from one screen to another after \
> JDK-8211999 because before JDK-8211999 we make a resize at the end of the drag, \
> which caused the full repaint of the window.

This pull request has now been integrated.

Changeset: 03473b4c
Author:    Sergey Bylokhov <serb@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/03473b4c271b2ec7f0ebdb0edabadf7f36816b9d
                
Stats:     19 lines in 2 files changed: 10 ins; 0 del; 9 mod

8270874: JFrame paint artifacts when dragged from standard monitor to HiDPI monitor

Reviewed-by: jdv

-------------

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic