From 75f88a979aab61f1b402ab047694857f139f2a38 Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 13 Dec 2022 20:43:40 +0300 Subject: [PATCH] `syncSize` should be called when window is visible to take into effect (#632) --- skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt b/skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt index 92665e910..db1c5d752 100644 --- a/skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt +++ b/skiko/src/awtMain/kotlin/org/jetbrains/skiko/SkiaLayer.awt.kt @@ -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) } @@ -145,6 +146,7 @@ actual open class SkiaLayer internal constructor( private fun checkShowing() { isShowingCached = super.isShowing() if (isShowing) { + redrawer?.syncSize() repaint() } }