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

    ursus

    10/29/2025, 5:25 PM
    Soo even though this is java, skiko is not & I need to build it separately for macos, windows, linux, right? Is there an easy way of doing this, other than having/renting a dedicated machine available to build on? (Maybe the skiko bit is prebuilt somewhere and I only need to include it or something like that .. ?)
    e
    a
    +3
    • 6
    • 7
  • u

    אליהו הדס

    10/30/2025, 7:24 AM
    Hi, I need to add options to the context menu, how I do that?
    a
    • 2
    • 5
  • n

    Nguyen Duc Tuan Minh

    10/30/2025, 8:03 AM
    Hi, I am developing Compose Multiplatform app, btw, the Swing panel is very buggy on Linux, the issue here is the Swing Panel always-on-top the Compose View (Box, etc). Any plan or any version fixed it? (Mac and Windows fixed)
  • b

    bj0

    10/30/2025, 11:57 PM
    I just notice if you put a
    TooltipArea
    over a button it completely blocks the button and it becomes unusable. My searching showed a comment from 3 years ago where the only suggestion was to use a custom made alternative. Is the built in one still not really usable?
    a
    a
    • 3
    • 4
  • b

    bj0

    10/31/2025, 12:38 AM
    Also, does the latest version of compose desktop require glibc 2.29? the previous version worked fine with 2.28. There's also this issue from 2 years ago about it with no responses: https://youtrack.jetbrains.com/issue/CMP-2279
    e
    • 2
    • 10
  • k

    Konstantin Kostov Gerry

    11/03/2025, 9:16 AM
    Hi folks, does anyone have a recommendation for an accessible date / time / date time picker desktop lib?
    s
    • 2
    • 2
  • s

    Stefan Oltmann

    11/05/2025, 1:37 PM
    I feel that https://youtrack.jetbrains.com/issue/CMP-4126 was closed to soon as this is still an issue you can run into in production.
  • t

    Trejkaz

    11/06/2025, 8:12 AM
    something a bit quirky about the current drag and drop behaviour - if I drag an image from a browser into my app, I get something that claims to be a FilesList, but when I ask for the files, it gives me a URI to a something.url file in the temp dir, which if I read it, ultimately contains the actual URL I wanted. A bit odd, considering that FilesList is actually a URI list.
    a
    • 2
    • 3
  • j

    John O'Reilly

    11/08/2025, 11:38 AM
    I've created dmg installer for a Compose for Desktop app but when I try to install/run the app I'm getting following. Anyone come across this?
    Copy code
    java.lang.NoSuchMethodError: 'boolean androidx.compose.runtime.Composer.shouldExecute(boolean, int)'
    j
    c
    • 3
    • 5
  • z

    Zoff

    11/09/2025, 9:38 AM
    how do i make a compose desktop (JVM) app only ever start 1 instance? is there a proper way of doing this?
    s
    u
    c
    • 4
    • 25
  • s

    Sargun Vohra

    11/10/2025, 3:50 AM
    Is there any elegant way to force Compose to repaint a region of the ui? I’m the maintainer of MapLibre Compose, and I’m working on a bug on macOS where a ghost image of the map remains after its been removed from the composition, until that region of the Compose UI is redrawn (say, through a window resize). Detailed context: I use a SwingPanel composable to integrate an AWT Canvas into my UI, and attach a CAMetalLayer to that canvas using jawt. The map is rendered with Metal to that layer. When the canvas is removed from the UI (handle
    removeNotify
    ), I remove the metal layer in obj-c++ like so:
    Copy code
    CAMetalLayer* layer = (__bridge CAMetalLayer *)metalLayer.get();
    [layer removeFromSuperlayer];
    But an image of the map remains in the Compose UI, at least until something else is rendered there, or a resize forces the app to repaint. I already tried: • before removing the layer,
    [layer.superLayer needsDisplay]
    • in my canvas’s removeNotify:
    parent.repaint()
    and
    SwingUtilities.getWindowAncestor(this).repaint()
    and
    SwingUtilities.getWindowAncestor(this).revalidate()
    --- Just before hitting send, I tried this hack:
    Copy code
    // HACK: Force a repaint by resizing the window slightly to avoid a ghost map on macoOS.
    val root = SwingUtilities.getWindowAncestor(this)
    val oWidth = root.width
    val oHeight = root.height
    root.size = Dimension(oWidth + 1, oHeight + 1)
    root.size = Dimension(oWidth, oHeight)
    And well, it works, but it feels wrong. Is there a better way?
    d
    • 2
    • 1
  • m

    Meet

    11/11/2025, 5:49 AM
    Hi everyone I’m using Compose Multiplatform Desktop and I’m building my app on an Apple Silicon Mac (M4). When I run the command:
    Copy code
    ./gradlew packageDistributionForCurrentOS
    it successfully generates a
    .deb
    package for amd64
    under
    /artifacts/build-mac/binaries/main/deb/dev-analyser_1.0.0-1_amd64.deb
    . But now I also want to create a build for Intel/ARM64 Mac — for example, an
    .arm64.dmg
    package. Is it possible to generate an ARM64
    .dmg
    file using Compose Multiplatform? Or is it only possible to build for the architecture of the current machine? Or any other way using ci/cd?
    m
    • 2
    • 22
  • m

    Meet

    11/12/2025, 5:38 AM
    UI not updating after StateFlow emit while window is inactive (Compose Desktop)
    Screen Recording 2025-11-12 at 10.45.08 AM.mov
    g
    • 2
    • 25
  • j

    Justin Tullgren

    11/12/2025, 10:48 PM
    Hi, similar question. Can you preview commonMain Compose UI? The starter app comes with the tooling Preview Annotation but it does not render anything. I have to put it into a preview in the jvmMain with a different annotation to get it to work. Slack Conversation
  • b

    Benni H.

    11/13/2025, 1:49 PM
    Has anyone found a way to set the background of the window of a compose-desktop app, so that it doesn't flicker during resizing that works on windows? The following has been mentioned in this slack a few times, but does not work on windows! (works fine on macOS, did not try linux)
    Copy code
    window.background = java.awt.Color(....)
    a
    • 2
    • 2
  • u

    אליהו הדס

    11/15/2025, 6:07 PM
    https://kotlinlang.org/docs/multiplatform/compose-compatibility-and-versioning.html It says here that Compose supports Windows ARM, how do I compile for Windows ARM?
    k
    • 2
    • 6
  • n

    Nguyen Duc Tuan Minh

    11/17/2025, 2:27 AM
    Hi everyone, I am developing a desktop app using CMP, btw when using package distribution, the native C dependency always missing, how can I package the app which contains all command line tool, native C, etc like yt-dlp, ffmpeg?
    m
    • 2
    • 1
  • s

    Slackbot

    11/17/2025, 9:56 AM
    This message was deleted.
    m
    • 2
    • 1
  • u

    אליהו הדס

    11/17/2025, 9:39 PM
    I've migrated my app to JBR 25, using Kotlin 2.3.0 beta2 for compatibility with JVM Toolchain 25. I've enabled Compact Object Headers, and while I haven't measured it, I'm definitely noticing a significant performance improvement! I'm really looking forward to the day when JEP 514 and 515 can be easily supported with the Compose plugin. Thanks, JetBrains!
    ❤️ 2
    m
    k
    • 3
    • 23
  • b

    bj0

    11/18/2025, 9:34 PM
    This page mentions
    decodeToImageVector
    being added in 1.7.3, but I can't seem to find it (im using 1.8.2, and i do see ``decodeToImageBitmap``), do i need to add a specific library for it to become available? edit: the page: https://kotlinlang.org/docs/multiplatform/whats-new-compose-170.html#functions-for-converting-byte-arrays-into-imagebitmap-or-imagevector
    k
    a
    • 3
    • 12
  • b

    bj0

    11/19/2025, 5:16 PM
    since I couldn't find
    decodeToImageVector
    , I tried getting compose resource plugin to work, but for my setup the default
    ResourceReader
    does not work. I thought I might be able to override it, since it's injected using
    LocalResourceReader
    , but it looks like all those classes are marked
    internal
    so I don't think I can do that. I'm not sure what options I have for getting this to work.
  • n

    Nguyen Duc Tuan Minh

    11/21/2025, 3:43 PM
    Hi everyone, I am build a desktop app using JVM target, can I use Mac native library inside JVM ?
    k
    s
    • 3
    • 11
  • b

    bj0

    11/27/2025, 12:15 AM
    cmp material3 api docs for
    DropdownMenu
    show an example image with what looks like a submenu (https://kotlinlang.org/api/compose-multiplatform/material3/androidx.compose.material3/-dropdown-menu.html). the material 3 design guide also shows submenus (https://m3.material.io/components/menus/overview). I am unable to find any actual documentation or examples for actually creating a submenu. Is this possible on compose for desktop?
  • v

    Vlad Gorbunov

    11/30/2025, 5:23 PM
    Hello, I am facing a problem integrating my custom cursors in compose app on desktop My implementation is:
    Copy code
    public actual val PointerIcon.Companion.ZoomIn: PointerIcon
        get() = customZoomInCursor
    
    public actual val PointerIcon.Companion.ZoomOut: PointerIcon
        get() = customZoomOutCursor
    
    private val customZoomInCursor: PointerIcon by lazy {
        val toolkit = Toolkit.getDefaultToolkit()
        val customCursor = toolkit.createCustomCursor(DesignRes.images.cursor_zoom_in.image, Point(8, 8), "ZoomIn")
        PointerIcon(customCursor)
    }
    
    private val customZoomOutCursor: PointerIcon by lazy {
        val toolkit = Toolkit.getDefaultToolkit()
        val customCursor = toolkit.createCustomCursor(DesignRes.images.cursor_zoom_out.image, Point(8, 8), "ZoomOut")
        PointerIcon(customCursor)
    }
    I try to switch between them when my image scale changes
    Copy code
    .pointerHoverIcon(if (scale >= 2f) PointerIcon.ZoomOut else PointerIcon.ZoomIn)
    However, cursors do not change. Upon investigating, I found out that internal
    AwtCursor
    does not implement hashCode and simply uses
    cursor.type
    value. Which is always -1 for both since it is a custom type indicator
    Copy code
    public static final int CUSTOM_CURSOR = -1;
    I've also found there is
    PointerIconService
    , but its internal and I can't plug my own. Has anybody had same issue? How do I use multiple custom cursors?
    a
    a
    • 3
    • 6
  • z

    Zoff

    12/02/2025, 7:45 PM
    can i change "MainKt" to something else? is that possible?
    r
    • 2
    • 3
  • k

    Kirill Grouchnikov

    12/03/2025, 9:07 PM
    It's been 3 years since the last release of Aurora, a library for building and styling desktop Compose applications. The next major release is planned for December 15th, and you can browse the list of all the changes and new features, including the brand new ribbon / command bar container. Posting here as a preview of the official announcement that will be happening in two weeks.
    🚀 1
    🎉 15
    k
    • 2
    • 2
  • w

    Wyatt Kennedy

    12/03/2025, 10:53 PM
    Hello, I'm exploring using compose desktop for a project and before I got much further I was just wondering if the ram usage of the release artifact for the basic project template is genuinely 100mb or if I'm just not setting the jvm settings right. I tried the settings below, but it still sucks up ~100mb at startup. Not a deal breaker or anything, just trying to figure out the baseline. The task I'm running is :packageReleaseMsi. I then install the msi, run the app and check ram usage in task manager.
    Copy code
    compose.desktop {
        application {
            mainClass = "org.test.test_compose_packaging.MainKt"
    
            nativeDistributions {
                targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
                packageName = "test_compose_packaging"
                packageVersion = "1.0.0"
            }
    
            jvmArgs += "-Xms5m"
        }
    }
    The install size is also ~103mb which is fine, it's just the ram usage I was a little disappointed with.
    ✅ 1
    a
    • 2
    • 1
  • w

    Wyatt Kennedy

    12/04/2025, 12:09 AM
    Managed to find some weird behavior, I'm trying to figure out if it's because of compose or hyprland. When on Linux (wayland only), does anyone know where compose looks up the dpi to get the size of .dp and .sp units? I have 3 monitors, and only when on the center monitor, the application scales much larger, as though the center workspace only has a higher dpi. I noticed intellij also does this and was wondering why they're the only applications I've found that do this on linux. all 3 monitors are set to the same 1.25 dpi scaling. The app scaling updates just dragging the window between the monitors. If someone can tell me it's a compose thing, I'll open an issue
    ✅ 1
    a
    • 2
    • 7
  • u

    אליהו הדס

    12/04/2025, 4:20 PM
    On Windows, I need my app to automatically launch right after the MSI installation. Any idea?
  • z

    Zoff

    12/04/2025, 6:55 PM
    is it possible for to have the bottom dependency only for linux and all others have the top one?
    Copy code
    implementation("org.xerial:sqlite-jdbc:3.51.1.0")
        //**//implementation("com.github.zoff99:pkgs_zoffcc_sqlite-jdbc-sqlcipher:1.0.19")