File tree Expand file tree Collapse file tree
compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/awt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import androidx.compose.runtime.getValue
2323import androidx.compose.runtime.remember
2424import androidx.compose.runtime.rememberCoroutineScope
2525import androidx.compose.runtime.rememberUpdatedState
26+ import androidx.compose.runtime.snapshots.Snapshot
2627import androidx.compose.ui.ExperimentalComposeUiApi
2728import androidx.compose.ui.graphics.painter.Painter
2829import androidx.compose.ui.input.key.KeyEvent
@@ -138,7 +139,9 @@ fun SwingWindow(
138139 // - Make the window displayable
139140 // - Size the window and the ComposeLayer correctly, so that we can draw it here
140141 if (! wasDisplayable && it.isDisplayable) {
141- it.renderImmediately()
142+ Snapshot .withoutReadObservation {
143+ it.renderImmediately()
144+ }
142145 }
143146 },
144147 )
You can’t perform that action at this time.
0 commit comments