https://kotlinlang.org logo
Join Slack
Powered by
# compose-desktop
  • z

    Zoff

    07/09/2025, 4:30 PM
    nobody facing this issue?
    j
    • 2
    • 1
  • u

    אליהו הדס

    07/10/2025, 2:27 PM
    Hi, has anyone found a simple way to fix the bug where the icon doesn't show up on Linux even in release mode?If you rebuild the .deb yourself with dpkg and modify the .desktop file, it works, but that's a bit of a heavy-handed method.
    a
    • 2
    • 7
  • j

    Jacob Ras

    07/11/2025, 11:38 AM
    Anyone know how to fix "this app is preventing shutdown" with a Compose Desktop app on Windows? Also regularly happens with JetBrains Toolbox
    👍 1
    👍🏻 1
    l
    d
    +2
    • 5
    • 5
  • v

    Vlad Vamos

    07/11/2025, 4:34 PM
    This is not necessarily related to Kotlin or Compose, but is anyone writing E2E UI tests for apps built with Compose Desktop? What some good options? (The emphasis is on E2E, so the Compose Multiplatform Testing Lib is of little use here.)
  • s

    S.

    07/15/2025, 9:49 AM
    is
    File(System.getProperty("compose.application.resources.dir"))
    supposed to work in non packaged applications, i.e. running a main function like in the example? because getProperty throws an NPE when I try that https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-native-distribution.html#adding-files-to-packaged-application
    a
    • 2
    • 1
  • d

    darkmoon_uk

    07/16/2025, 10:31 PM
    Has anyone here got
    commonMain
    Preview working? I cannot, for the life of me, make this work in IntelliJ IDEA 2025.1.3. I'm using Compose
    1.9.0-beta3
    , tried with & without Android Multiplatform plugin installed, of course including in `commonMain`:
    Copy code
    implementation(compose.components.uiToolingPreview)
    ...the gutter or preview options never light up on my
    @Preview
    's. What's the trick!? I hope
    1.9.0
    comes with some instructions because whatever it is, it must be a very fickle set of configurations and sure as hell is not obvious! kodee grumpy The years of my life wasted trying to get common previews (since CfD released) are going to stop being measured in fractions soon.
    p
    i
    • 3
    • 10
  • m

    Marc Reichelt

    07/17/2025, 9:55 AM
    Hey there! I’m trying to build a Compose Desktop JAR that should run on both Mac + Linux. If I use
    ./gradlew packageDistributionForCurrentOS
    on my Mac, of course the JAR will be having the mac native packages, so running the JAR on Linux will throw an exception (see screenshot). Or at least: how can I build a Linux-ARM64 uber JAR on my Mac? That would help me already!
    a
    a
    s
    • 4
    • 10
  • a

    appmattus

    07/18/2025, 7:53 PM
    Hey, I’m currently preparing an app for releasing to the Mac App Store but get a “finished with non-zero exit value 137” error whenever I apply entitlements to my project. The release app works fine without the entitlements files so there’s no obvious issue with proguard etc or any other setting that I can see. I’m using the files as defined in https://github.com/JetBrains/compose-multiplatform/tree/master/tutorials/Signing_and_notarization_on_macOS Is it expected behaviour for an app with entitlements to no longer load when launched directly?
  • u

    אליהו הדס

    07/20/2025, 12:27 PM
    Hi everyone, As some of you know, I'm the developer of Compose Native Tray, a library that I find quite popular given the growing use of Compose Desktop. It addresses a real issue that many developers run into. For those already using it, you’ve probably noticed that the Linux integration isn’t great. It relies on
    libappindicator
    , which doesn’t allow capturing primary clicks – and personally, that really bothers me. I’d like to implement a "legacy" alternative using DBus. I’ve got a prototype: I can display the icon and successfully capture primary clicks. However, I can’t seem to get the context menu to show up, and I can’t figure out why. Does anyone have any idea or could give me a hand? Thanks a lot!
    z
    • 2
    • 2
  • m

    mohamed rejeb

    07/23/2025, 11:35 AM
    Any plans to fix directx renderer on Windows, it has a lot of flickering issues (flickering on hover buttons appears even on jb toolbox, flickering with some random black squares grid on complex paths/images when there is a lot of content...) These issues have been there for years now, it should be a priority.
    n
    a
    • 3
    • 20
  • d

    darkmoon_uk

    07/28/2025, 3:40 AM
    This day; the once-dry lakebeds of the Kotlin plains surge with tears of joy... our joy, Night after night of frustration, years of hurt... we are finally at the promised land: kodee loving K K ✨ 💬 📢
    commonMain
    `@Preview`s WORK in IntelliJ ✨K K kodee happy I can't believe it, I feel high... drunk... elated... all at the same time, it's too much. Whoever made this happen, you are champions of the universe, you are our messiahs. Here; here is the forbidden knowledge that must now be committed in stone, so that future tech-archaeologists can piece-together what this moment meant, for those blessed enough to live it:
    Copy code
    kotlin = "2.1.21"
    compose = "1.9.0-beta01"
    viewmodel-compose = "2.9.1" (must be latest to compile vs Compose)
    
    Android, Desktop targets (and an iOS in my case)
    
    compose.dependencies.uiToolingPreview in commonMain
    compose.dependencies.uiTooling in both androidMain and jvmMain
    
    IntelliJ IDEA 2025.1.4.1 (Ultimate Edition)
    💥 2
    K 6
    😄 16
    🙃 1
    c
    a
    +3
    • 6
    • 11
  • t

    tylerwilson

    07/28/2025, 3:24 PM
    I am using some CMP UI I had written for Android and iOS to JVM/Desktop. This includes a view where I have both horizontal and vertical scrolling. Since desktop does not appear to support dragging with mouse at all, I need to use mouse wheel for vertical scroll. And I expect to add arrows to do the horizontal scrolling. Question is: how can I detect I am in an environment that requires this scrolling via button versus scrolling with drag? Hope that makes sense. Thank you.
    a
    • 2
    • 3
  • a

    Anton Popov

    07/31/2025, 4:27 PM
    Hi! I have encountered this problem when trying to develop my first desktop app: contents of the PATH environment variable acquired from
    System.getenv()
    are much smaller when running a packaged Compose for Desktop app on macOS. However, when running the same app from the IDE using various Gradle tasks, PATH env var has full content. I've filed a bug on YouTrack, but also wanted to ask here — has anyone encountered this?
    solved 1
    j
    c
    • 3
    • 7
  • d

    David Breneisen

    08/01/2025, 1:44 AM
    Where does data typically get stored for desktop apps? Is it OS dependent? I’m trying to find where it’s going on a mac for the multiplatform-settings library
    k
    r
    c
    • 4
    • 7
  • u

    אליהו הדס

    08/04/2025, 12:52 PM
    Hi, can I custom the
    SelectionContainer
    ? I need to customize the context menu
    z
    a
    • 3
    • 3
  • d

    Didier Villevalois

    08/05/2025, 5:53 PM
    I've been doing a little more Compose these days and I just wanted to give thanks for Compose Hot Reload. That and Junie are completely changing my workflow for the better! 💕 💕 💕
    ➕ 5
    🎉 8
  • y

    Yassine Abou

    08/06/2025, 1:16 AM
    When I ran
    ./gradlew packageReleaseDistributionForCurrentOS
    , I encountered this issue: Unexpected error.
    java.io.IOException: Please correct the above warnings first.
    What went wrong: Execution failed for task
    :composeApp:proguardReleaseJars
    . Even after adding these below rules to ProGuard: See the image for the full error message and the ProGuard file in the description: Copy
    Copy code
    # --- Ignore all missing-dependency warnings that come from Ktor/Netty ---
    -dontwarn io.ktor.**
    -dontwarn io.netty.**
    -dontwarn org.slf4j.**
    -dontwarn kotlinx.io.**
    -dontwarn kotlinx.datetime.**
    -dontwarn org.bouncycastle.**
    -dontwarn org.conscrypt.**
    -dontwarn org.openjsse.**
    
    # (optional) Make ProGuard continue even when new warnings appear
    -ignorewarnings
    my Compose plugin version is
    1.9.0-beta01
    . To see the whole ProGuard rules, check out this link: https://github.com/yassineAbou/LLMS/blob/master/composeApp/compose-desktop.pro
  • m

    Michael Job

    08/11/2025, 11:15 AM
    Hi all, does anyone know of a #webcam integration for #C01D6HTPATV? The official repo at https://github.com/JetBrains/compose-multiplatform/tree/master/examples/imageviewer states: "Camera is not available on Desktop for now. Instead, we will use a random picture." So this is no starting point. I tried to use
    Copy code
    implementation("org.bytedeco:javacv-platform:1.5.12")
        implementation("org.bytedeco:opencv:4.9.0-1.5.10:macosx-arm64")
    but it crashes with Error "long org.opencv.videoio.VideoCapture.VideoCapture_5(int)" - I tried several things... now I'm stuck.
    ✅ 1
    u
    g
    e
    • 4
    • 9
  • m

    mikehearn

    08/12/2025, 12:48 PM
    I'm curious why the latest template app has switched from
    desktopMain
    to
    jvmMain
    as a source set. It feels like this has switched back and forth over time and I don't quite understand why.
    👀 2
    s
    g
    +4
    • 7
    • 18
  • t

    Tepes Lucian Victor

    08/18/2025, 3:58 PM
    tried searching on different channels but didn't find anything usefull - is there an up to date fork of https://github.com/icerockdev/moko-permissions that has jvm and/or wasm targets with blank implementations?
    m
    • 2
    • 1
  • u

    אליהו הדס

    08/18/2025, 4:41 PM
    Hey team! 👋 Made a small plugin that fixes two annoying things: - App icons not showing up correctly in Linux dock/taskbar - Missing package dependencies in your .deb files Just got tired of dealing with these issues manually every release 😅 https://github.com/kdroidFilter/GradleComposeDesktopLinuxDeps
    👍 1
    🎉 2
    m
    a
    • 3
    • 5
  • u

    אליהו הדס

    08/20/2025, 10:38 AM
    Hi everyone, can someone know how I can make an window invisible for the dock on macOS? thank you
    s
    c
    • 3
    • 16
  • s

    S.

    08/20/2025, 3:10 PM
    How do people handle deep links in windows apps? It's technically working, but for each link windows creates a new process - starts a second instance of my app. I found a common way to solve this for jvm apps, is to check for already running instances and then communicating back to the original one. in my case I'm simply trying to bind a socket to the same port, which fails for subsequent instances. This approach does work, but it's not ideal because it adds delay due to spinning up another instance while also showing the splash image again. Are there any other solutions?
    p
    u
    • 3
    • 29
  • n

    Nicolas Patin

    08/21/2025, 2:09 PM
    Hi everyone 👋 I updated my compose version from 1.8.2 to 1.9.0-beta03 and I encountered the following bug on desktop. When I click with mouse on a clickable element, the element keeps the focus in the same way that if I select this element with the keyboard (with the default LocalIndication). I tried to debug it, and I found that the
    FocusInteraction.Unfocus
    is never called. I found this old issue that seems close to mine, but I'm not sure. Any idea if it's a bug or an accessibility feature ? Works fine on Android & iOS (no
    HoverInteraction
    /
    FocusInteraction
    calls, which seems logic) (code & video in 🧵) Thanks 🙂
    a
    • 2
    • 15
  • t

    tylerwilson

    08/21/2025, 4:56 PM
    I have a good sized Compose MP Android/iOS app that I added a jvm/desktop target to. It runs fine from IDE, but when I try to build package with packageReleaseDmg, it causes the IDE to run out of memory and crash. Is this a known issue? I am using Kotlin 2.2.10 and Compose MP 1.9.0-beta03. Thanks.
    a
    • 2
    • 3
  • p

    phteven

    08/22/2025, 1:03 AM
    Is there some tooling available to detect io/network access on the compose ui thread on desktop?
    j
    • 2
    • 1
  • r

    rnett

    08/23/2025, 1:38 AM
    Hey folks, in the latest
    1.9.0-beta3
    release there's something odd with the material3 version. To quote the release notes:
    Gradle Plugin
    org.jetbrains.compose
    , version
    1.9.0-beta03
    . Based on Jetpack Compose libraries:
    • Runtime 1.9.0-rc01
    • UI 1.9.0-rc01
    • Foundation 1.9.0-rc01
    • Material 1.9.0-rc01
    • Material3 1.3.2
    Compose Material3 libraries
    org.jetbrains.compose.material3:material3*:1.9.0-beta03
    . Based on Jetpack Compose Material3 1.4.0-beta01
    The version mentioned for the Gradle plugin conflicts with the version mentioned for the material3 library. And indeed, the
    1.9.0-beta3
    Gradle plugin dependency helper adds version
    org.jetbrains.compose.material3:material3-adaptive-navigation-suite:1.8.2
    of material3. Why is it adding a 1,8 version instead of say
    1.9.0-beta03
    ? This is very counterintuitive
    i
    t
    o
    • 4
    • 8
  • d

    Didier Villevalois

    08/26/2025, 11:23 AM
    Hey everyone! I see that
    LocalWindowInfo.current.containerSize
    is initially (0, 0). So I am forced to do
    Copy code
    Window(...) { if (LocalWindowInfo.current.containerSize != IntSize(0, 0)) { App() } }
    so that
    currentWindowAdaptiveInfo()
    doesn't return a
    COMPACT
    window class at first composition. Am I doing something wrong or is this expected?
    a
    • 2
    • 5
  • b

    bj0

    08/27/2025, 6:30 PM
    Oh that's tricky, took me a while to figure out why these 2 previews produced different background colors:
    Copy code
    @Preview
    @Composable
    private fun Preview() {
        styled {
            Surface(
                modifier = Modifier.fillMaxSize(),
                color = MaterialTheme.colorScheme.surfaceContainerHigh
            ) {
                Text("Weird Background Swap")
            }
        }
    }
    
    @Preview
    @Composable
    private fun Preview1() {
        surface {
            Text("Weird Background Swap")
        }
    }
    
    
    @Composable
    fun surface(color: Color = MaterialTheme.colorScheme.surfaceContainerHigh, content: @Composable () -> Unit) {
        styled {
            Surface(
                color = color,
                modifier = Modifier.fillMaxSize()
            ) {
                content()
            }
        }
    }
    
    
    @Composable
    fun styled(content: @Composable () -> Unit) {
        MaterialTheme(
            colorScheme = darkScheme
        ) {
            content()
        }
    }
    p
    • 2
    • 1
  • t

    Tlaster

    08/28/2025, 4:57 PM
    Just a thought: can we have iOS like over scroll effect in compose desktop when using macOS?