Skip to content

Commit

Permalink
HiDPI: fixed occasional wrong repaint areas when using `HiDPIUtils.in…
Browse files Browse the repository at this point in the history
…stallHiDPIRepaintManager()` (see PR #864)
  • Loading branch information
DevCharly committed Aug 4, 2024
1 parent 97b21bf commit d27e056
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ FlatLaf Change Log
- Popup: Fixed `UnsupportedOperationException: PERPIXEL_TRANSLUCENT translucency
is not supported` exception on Haiku OS when showing popup (partly) outside of
window. (issue #869)
- HiDPI: Fixed occasional wrong repaint areas when using
`HiDPIUtils.installHiDPIRepaintManager()`. (see PR #864)


## 3.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,12 @@ public static void addDirtyRegion( JComponent c, int x, int y, int width, int he
int x2 = x + c.getX();
int y2 = y + c.getY();
for( Component p = c.getParent(); p != null; p = p.getParent() ) {
x2 += p.getX();
y2 += p.getY();
if( x2 + width < p.getWidth() && y2 + height < p.getHeight() && p instanceof JComponent ) {
callback.addDirtyRegion( (JComponent) p, x2, y2, width, height );
return;
}
x2 += p.getX();
y2 += p.getY();
}
}

Expand Down

0 comments on commit d27e056

Please sign in to comment.