Skip to content

Commit c42ef79

Browse files
committed
Remove off-screen initial position to fix RAM usage spike
1 parent 1faadff commit c42ef79

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • src/commonMain/kotlin/com/kdroid/composetray/tray/api

src/commonMain/kotlin/com/kdroid/composetray/tray/api/TrayApp.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,7 @@ private fun ApplicationScope.TrayAppImplOriginal(
516516
// Store window reference for macOS Space detection
517517
var windowRef by remember { mutableStateOf<java.awt.Window?>(null) }
518518

519-
// Position off-screen initially to prevent flash at wrong position.
520-
// The LaunchedEffect will set the correct position before showing the window.
521-
val dialogState = rememberDialogState(
522-
position = WindowPosition((-10000).dp, (-10000).dp),
523-
size = currentWindowSize
524-
)
519+
val dialogState = rememberDialogState(size = currentWindowSize)
525520
LaunchedEffect(currentWindowSize) { dialogState.size = currentWindowSize }
526521

527522
// Visibility controller for exit-finish observation; content will NOT be disposed.

0 commit comments

Comments
 (0)