Skip to content

Commit

Permalink
syncSize should be called when window is visible to take into effect (
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeevPavel authored Dec 13, 2022
1 parent cf38e7e commit 75f88a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ actual open class SkiaLayer internal constructor(
val window = SwingUtilities.getRoot(this) as Window
window.addComponentListener(fullscreenAdapter)
backedLayer.defineContentScale()
checkContentScale()
checkShowing()
init(isInited)
}
Expand All @@ -145,6 +146,7 @@ actual open class SkiaLayer internal constructor(
private fun checkShowing() {
isShowingCached = super.isShowing()
if (isShowing) {
redrawer?.syncSize()
repaint()
}
}
Expand Down

0 comments on commit 75f88a9

Please sign in to comment.