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

    ursus

    10/15/2025, 11:57 PM
    Copy code
    plugins {
        id "org.jetbrains.kotlin.jvm" version "2.2.20"
        id "org.jetbrains.kotlin.plugin.compose" version "2.2.20"
        id "org.jetbrains.compose" version "1.9.1"
    }
    
    //
    //
    //
    fun main(args: Array<String>) = singleWindowApplication {
        AppTheme {
            ...
        }
    }
    
    @Composable
    fun AppTheme(content: @Composable () -> Unit) {
        MaterialTheme(
            colors = if (isSystemInDarkTheme()) { <-----------------------
                darkColors()
            } else {
                lightColors()
            },
        ) {
            Surface(color = MaterialTheme.colors.background, content = content)
        }
    }
    Why is the compose desktop app not reacting to dark mode changes? I'm testing on
    mac os
    and
    windows
    , and when I toggle the system setting it does nothing. After restart it picks up the current setting but not during runtime. Is this known?
    z
    a
    u
    • 4
    • 8
  • d

    dhia chemingui

    10/16/2025, 3:56 PM
    Hi Folks. I have question How I could extract glyphs paths as compose paths from fonts using jetbrains skia or even compose . Or its impossible ? I try to load typface with skiko typface but there is no api provided for that so I try TypefaceFontProvider but it does not work the data loaded as byte but when asign it the typface is null .
    Copy code
    val provider = TypefaceFontProviderWithFallback()
    
    val data = Data.makeFromBytes(Res.readBytes("font/cairomedium.ttf"))
    
    val typeface = provider.makeFromData(data)
    k
    • 2
    • 1
  • j

    jdemeulenaere

    10/18/2025, 7:50 PM
    Is there any plugin or even existing example to add screenshot tests to Compose Multiplatform/Desktop?
    z
    • 2
    • 1
  • j

    jdemeulenaere

    10/20/2025, 5:35 PM
    I'm using a custom
    configurations.resolutionStrategy.eachDependency { ... }
    block to automatically set the versions of my 3P dependencies, and for some reason this doesn't work well in the IDE when syncing my project (e.g. it prints the error
    Could not find org.jetbrains.compose.runtime:runtime:.
    and the references don't work) but the code compiles fine with Gradle. Any idea what could be causing this by any chance?
    • 1
    • 2
  • k

    Konstantin Kostov Gerry

    10/21/2025, 12:45 PM
    Hi folks. Is it possible to set a different
    packageName
    per platform? I've been trying various combinations but it leads to strange results. For example, setting
    nativeDistributions.packageName
    and
    nativeDistributions.macOS.packageName
    results in
    nativeDistributions.packageName
    being used. If I also set
    nativeDistributions.windows.packageName
    the outcome is that the package name for windows is used for all platforms e.g.:
    Copy code
    compose.desktop {
        application {
            mainClass = "org.example.project.MainKt"
    
            nativeDistributions {
                targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
                packageName = "org.example.project"
                packageVersion = "1.0.0"
    
                macOS {
                    packageName = "Foo"
                }
    
                windows {
                    packageName = "Bar"
                }
            }
        }
    }
    e
    j
    • 3
    • 3
  • u

    ursus

    10/22/2025, 2:07 PM
    When I'm in darkmode, and I resize the window quickly, it seems that the compose ui is not keeping up & I'm seeing flashes of the "window" underneath. Am I doing something wrong?
    Copy code
    fun main(args: Array<String>) {
        singleWindowApplication(
            title = "Git Gooey",
            state = WindowState(size = DpSize(width = 1600.dp, 960.dp))
        ) {
            App()
        }
    }
    
    @Composable
    private fun App() {
        AppTheme {
            Surface(color = MaterialTheme.colorScheme.background) {
                MainPanes()
            }
        }
    }
    Code I believe is nothing special. Any way around that?
    Screen Recording 2025-10-22 at 16.05.48.mov
    j
    a
    u
    • 4
    • 9
  • u

    אליהו הדס

    10/22/2025, 9:37 PM
    It is possible tu use app cds with compose desktop ?
    👀 1
    e
    m
    • 3
    • 13
  • s

    S.

    10/26/2025, 11:29 AM
    When using an undecorated window and
    WindowDraggableArea
    , is it possible to get the Windows window management tools (see screenshot) when moving the app to the top of my screen?
    u
    a
    • 3
    • 8
  • u

    אליהו הדס

    10/26/2025, 12:32 PM
    Hi, how to compile my app for Mac Intel?
    a
    m
    • 3
    • 11
  • c

    Cherrio LLC

    10/26/2025, 4:23 PM
    Hello, is there a way to make a desktop app behave like Jetbrains Toolbox. It's a floating window that can be opened or closed by clicking the tray icon or touch outside? And I also noticed its not a window. Am I wrong??
    s
    a
    +3
    • 6
    • 6
  • u

    ursus

    10/28/2025, 7:27 PM
    Was someone able to get AOT cache going for faster startup? (java 25)
    p
    a
    • 3
    • 71
  • u

    ursus

    10/29/2025, 2:31 AM
    Is there a way to make the semaphore padding same as is on the "modern" macos apps? (Foreground is Preferences app, background is my Compose desktop app)
    u
    • 2
    • 2
  • 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
    • 2
    • 4
  • 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
    • 3
    • 24
  • 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.
    c
    m
    • 3
    • 2