File tree Expand file tree Collapse file tree
src/commonMain/kotlin/com/kdroid/composetray/tray/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -707,6 +707,7 @@ private fun ApplicationScope.TrayAppImplLinux(
707707 menu : (TrayMenuBuilder .() -> Unit )? ,
708708 content : @Composable DialogWindowScope .() -> Unit ,
709709) {
710+ val isKde = detectLinuxDesktopEnvironment() == LinuxDesktopEnvironment .KDE
710711 val trayAppState = state ? : rememberTrayAppState(
711712 initialWindowSize = windowSize ? : DpSize (300 .dp, 200 .dp),
712713 initiallyVisible = visibleOnStart,
@@ -741,7 +742,7 @@ private fun ApplicationScope.TrayAppImplLinux(
741742 }
742743
743744 val dialogState = rememberDialogState(position = initialPositionForFirstFrame, size = currentWindowSize)
744- if (detectLinuxDesktopEnvironment() == LinuxDesktopEnvironment . KDE ) SideEffect { dialogState.position = initialPositionForFirstFrame }
745+ if (isKde ) SideEffect { dialogState.position = initialPositionForFirstFrame }
745746 LaunchedEffect (currentWindowSize) { dialogState.size = currentWindowSize }
746747
747748 // Visibility controller for exit-finish detection; content will NOT be disposed.
You can’t perform that action at this time.
0 commit comments