You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fun main() = application {
var isVisible by remember { mutableStateOf(false) }
Window(onCloseRequest = ::exitApplication, visible = isVisible, undecorated = true) {
WindowDraggableArea {
Box(Modifier.fillMaxWidth().height(48.dp).background(Color.DarkGray))
}
}
}
Exception:
Exception in thread "main" java.awt.IllegalComponentStateException: The frame is displayable.
at java.desktop/java.awt.Frame.setUndecorated(Frame.java:926)
at androidx.compose.ui.awt.ComposeWindow.setUndecorated(ComposeWindow.desktop.kt:102)
at androidx.compose.ui.util.Windows_desktopKt.setUndecoratedSafely(Windows.desktop.kt:137)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1$3.invoke(Window.desktop.kt:194)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1$3.invoke(Window.desktop.kt:194)
at androidx.compose.ui.util.ComponentUpdater$UpdateScope.set(ComponentUpdater.kt:45)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1.invoke(Window.desktop.kt:194)
at androidx.compose.ui.window.Window_desktopKt$Window$5$1.invoke(Window.desktop.kt:191)
at androidx.compose.ui.util.ComponentUpdater.update(ComponentUpdater.kt:27)
at androidx.compose.ui.window.Window_desktopKt$Window$5.invoke(Window.desktop.kt:191)
at androidx.compose.ui.window.Window_desktopKt$Window$5.invoke(Window.desktop.kt:152)
at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:88)
at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:87)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$2.invoke(UpdateEffect.desktop.kt:58)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$2.invoke(UpdateEffect.desktop.kt:54)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:1798)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:121)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke$performUpdate(UpdateEffect.desktop.kt:54)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke(UpdateEffect.desktop.kt:62)
at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke(UpdateEffect.desktop.kt:47)
at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:81)
at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:802)
at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:647)
at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:763)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:433)
at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:179)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Process finished with exit code 1
Trying to workaround by setting undecorated to isVisible as well (only enabling undecorated when visible) doesn't work either, as soon as the value is toggled once, the same exception appears.
The text was updated successfully, but these errors were encountered:
…orated = true
window.makeDisplayable() is a default behaviour now for any AWT window, which is called only after we set all properties for the window
FixesJetBrains/compose-multiplatform#1652
…orated = true
window.makeDisplayable() is a default behaviour now for any AWT window, which is called only after we set all properties for the window
FixesJetBrains/compose-multiplatform#1652
FixesJetBrains/compose-multiplatform#1794FixesJetBrains/compose-multiplatform#1652
If the first frame is too long to draw (> 500ms), users should make their apps asynchronous and draw UI gradually in multiple frames without blocking the UI thread for too long in single frame.
Change-Id: I3f01c963478bf23ee75e4adeb45a172b25591073
Test: ./gradlew jvmTest desktopTest -Pandroidx.compose.multiplatformEnabled=true
This example reproduces the issue:
Exception:
Trying to workaround by setting undecorated to isVisible as well (only enabling undecorated when visible) doesn't work either, as soon as the value is toggled once, the same exception appears.
The text was updated successfully, but these errors were encountered: