https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose-desktop
  • a

    Alina Dolgikh [JB]

    03/15/2023, 1:32 PM
    🆕 Description of the channel Discussions about using Compose for desktop development: • How to configure windows, trays, menus, etc. • How to create a native distribution. • How to integrate with other desktop frameworks or the desktop platform API. If a discussion is not limited to desktop development and could be relevant to other platforms, it is better to use the #compose channel. If you want to call attention to an issue, please report it in the issue tracker of the project you are using. If you want to ask a question and think that it could be posted on StackOverflow, consider posting it there to make the question more discoverable for other people. Please use the relevant tag [compose-desktop]. Compose Multiplatform :compose: Project page :ladybug: Issue tracker 🎁 Releases
    e
    • 2
    • 1
  • a

    Alina Dolgikh [JB]

    03/15/2023, 1:33 PM
    set the channel description: https://kotlinlang.slack.com/archives/C01D6HTPATV/p1678887144652589
  • m

    Mario Javier Medina Cocom

    03/17/2023, 6:54 AM
    i’ve been testing the new release of our desktop application and several of my coworkers and i are seeing this error, what could be causing it?
    o
    m
    • 3
    • 12
  • u

    姜尚

    03/17/2023, 9:43 AM
    On Windows, how do I set the application to start when the user logs in, or unset it when it runs
    n
    m
    • 3
    • 2
  • p

    PHondogo

    03/19/2023, 1:33 PM
    Hello! Is there already existing support for copy/paste in TextField using keyboard? If yes, how to enable it?
    m
    • 2
    • 4
  • s

    Samuel Ochuba

    03/19/2023, 8:22 PM
    Hi . i would love to print docket from Kmm desktop over wifi or bluetooth printer. if anyone has any pointer or resources . i would greatly appreciate
  • a

    Adam Brown

    03/19/2023, 8:51 PM
    huh, so I've got a
    Dialog
    that i've set the size to Unspecified
    rememberDialogState(size = DpSize.Unspecified)
    But now some, but not all, of my dialogs are throwing
    IllegalStateException: DpSize is unspecified
    Even if I give the internal views a definite size, something like
    Box(modifier = Modifier.size(200.dp).padding(Ui.Padding.XL)) {
    a
    • 2
    • 1
  • s

    spierce7

    03/19/2023, 10:16 PM
    What are the security concerns I'd need to take into consideration if I were to use something like JCL or a custom class loader, to dynamically load classes into my Compose Desktop application? My goal is to be able to download my jars dynamically, unload my application's old classes (by ditching the old class loader I assume), and load in my new classes dynamically effectively updating my application without closing the process.
    j
    m
    • 3
    • 4
  • j

    Jurriaan Mous

    03/20/2023, 7:24 AM
    Hi, I am new to compose and am creating a multiwindow/multidocument app, and I notice that when I remove a window with the current construct I am using, wrong windows get closed. How can I make sure the right window with state gets closed? I have all the state within the App component with remember statements. Or should I move up all window/app state to the application level and remove it from within the components to ensure the window uses the right state? I expected that I could maybe pass an id or something to the Window so it would all work correctly. Am I making wrong assumptions here, is this a bug, or am I missing something? Thanks!!
    @OptIn(ExperimentalComposeUiApi::class)
    fun main() = application {
        val windows = rememberSaveable { mutableStateOf(listOf(0)) }
        val newWindowId = rememberSaveable { mutableStateOf(1) }
    
        fun onClose(windowId: Int) {
            if (windows.value.isEmpty()) {
                exitApplication()
            }
            windows.value = windows.value.filter { it != windowId }
        }
    
        windows.value.map { windowId ->
            Window(onCloseRequest = { onClose(windowId) }, title = "Window") {
                MenuBar {
                    Menu("File", mnemonic = 'F') {
                        Item(
                            "New Window",
                            onClick = {
                                windows.value = windows.value + newWindowId.value
                                newWindowId.value += 1
                            },
                            shortcut = KeyShortcut(Key.N, meta = true, alt = true)
                        )
                    }
                }
                App()
            }
        }
    }
    m
    • 2
    • 3
  • s

    Stefan Oltmann

    03/20/2023, 12:09 PM
    Does anyone have experience with setting
    skiko.directx.gpu.priority
    to
    discrete
    ? Will it fall back to
    integrated
    if no dedicated graphics card is available? I wonder why the
    auto
    setting prefers the integrated card. A user of my app has a notebook with Intel HD graphics and an extra NVIDIA card, which of course has more power. It's strange that this is not used by default. Will setting it to
    discrete
    break my app for all users without dedicated graphics card?
    o
    • 2
    • 2
  • s

    Stefan Oltmann

    03/20/2023, 12:44 PM
    Is there a way to request the name of the currently used graphics device? I want to show that in my about screen.
    k
    o
    • 3
    • 3
  • s

    Slackbot

    03/20/2023, 10:47 PM
    This message was deleted.
    a
    s
    • 3
    • 2
  • c

    czuckie

    03/22/2023, 8:51 AM
    Just to make sure I understand- things like
    androidx.compose.foundation:foundation:1.4.0-rc01
    are only android libraries and cannot be used in MPP? Is there anyway to determine whether an artifact being used as a dependency only targets a single platform?
    n
    • 2
    • 3
  • f

    Franklin

    03/22/2023, 10:30 AM
    Hey, is it possible to create an Intel/x64 MacOS app on M1/ARM machines? There's a proposal to upgrade all our CI machines to M1/ARM. However, I'd need to support x86 for a while, which is why I'm asking.
    m
    • 2
    • 2
  • k

    Kirill Grouchnikov

    03/22/2023, 12:51 PM
    🔥
    i
    • 2
    • 1
  • r

    Ryan Smith

    03/22/2023, 11:30 PM
    Is Material Design 3 available for compose for desktop? I added the dependency to my build.gradle.kts and had a successful sync, but still get components from M2 instead of M3
    a
    • 2
    • 7
  • m

    mikehearn

    03/23/2023, 3:04 PM
    We published a new tutorial on how to deploy Kotlin desktop apps that use JCEF to embed Chromium. It uses Conveyor to cross-build self-updating fully signed/notarized packages for every OS, with Chromium bundled into the app. It's easy! If you ever wanted an "Electron for Kotlin" then this is it. You can also combine it with Swing UI and there's experimental support for Compose Multiplatform too. https://hydraulic.software/blog/13-deploying-apps-with-jcef.html Posted in #feed
  • a

    Ahmad Hassan

    03/24/2023, 9:13 AM
    Hi, I'm trying
    ./gradlew package
    but facing an issue. Check the Logs inside the thread.
    l
    • 2
    • 3
  • a

    Artem Chepurnoy

    03/24/2023, 9:20 AM
    Trying to fix the
    Error occurred during initialization of VM
    Could not reserve enough space for code cache (245760K)
    that now happens for me in new the builds, I've tried to add the entitlements file: entitlements.plist
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<http://www.apple.com/DTDs/PropertyList-1.0.dtd>">
    <plist version="1.0">
    <dict>
        <key>com.apple.security.app-sandbox</key>
        <true/>
        <key>com.apple.security.cs.allow-jit</key>
        <true/>
        <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
        <true/>
        <key>com.apple.security.cs.disable-library-validation</key>
        <true/>
        <key>com.apple.security.cs.allow-dyld-environment-variables</key>
        <true/>
        <key>com.apple.security.cs.debugger</key>
        <true/>
        <key>com.apple.security.device.audio-input</key>
        <true/>
        <!-- Added to fix: Could not reserve enough space for code cache -->
        <!-- <https://github.com/iterate-ch/cyberduck/issues/13347> -->
        <key>com.apple.security.automation.apple-events</key>
        <true/>
    </dict>
    </plist>
    build.gradle.kts
    macOS {
      bundleID = "hello.world"
      entitlementsFile.set(project.file("entitlements.plist"))
      signing {
        // Config here.
      }
      notarization {
        // Config here.
      }
    }
    the build now fails with an error
    Error: Invalid Option: [--mac-entitlements]
    . I'm using Kotlin 1.8.10 and Compose 1.3.1 +
    ./gradlew :desktop:packageDmg :desktop:notarizeDmg
    to compile it.
  • j

    John O'Reilly

    03/24/2023, 4:52 PM
    What version of Compose for Desktop are folks using with Kotlin 1.8.20-RC?
    i
    • 2
    • 1
  • a

    Adam Brown

    03/24/2023, 5:39 PM
    are there any solutions for producing self contained distributions, snaps/flatpack/msix?
    b
    • 2
    • 2
  • k

    Kirill Grouchnikov

    03/24/2023, 6:52 PM
    @Igor Demin - how frequently does https://github.com/JetBrains/compose-multiplatform-core get synced with the main AndroidX repository? For example, this change from January 6th this year is still not in the latest
    1.4.0-alpha01-dev980
    build of compose-multiplatform.
    n
    • 2
    • 4
  • y

    YentaBot

    03/24/2023, 7:07 PM
    Hello! I'm a bot which answers questions based on historical messages in Slack Now that I've been added to this channel, I'll begin reading all the history and you can ask me questions, which I'll try my best to answer. Ask me a question by beginning a message with
    @yentabot
    You can also emoji-react to a message with ❓ or 🤖. Feel free to give me feedback by replying to my answers in a thread or leaving emoji-reacts to my answers.
    b
    b
    +2
    • 5
    • 7
  • r

    Radoslaw Juszczyk

    03/25/2023, 7:56 AM
    Hey guys, I am trying to sign a desktop-compose app for distribution to Mac AppStore, with testflight configured: I followed this tutorial. And I managed to get my .pkg verified successfully via the Transporter app (first pic). But if i try to install that .pkg, it succeeds but nothing is installed. Is it normal? Also if I try to run the .app file from the /build/compose/binaries/main/app directory it crashes with Code Signature Invalid (second pic) Is it normal? I described the exact steps I performed in this doc: https://docs.google.com/document/d/e/2PACX-1vR8ZLuLSK06ZypiS3yqXzIttDqqQzOCAoxe0X_-kO3UV0pcc2EUL5qI82jk6jxnrh8y7aVOnsIBVnI9/pub
    • 1
    • 2
  • l

    loloof64

    03/25/2023, 9:46 AM
    Hi ! I'm creating a simple ChessClock in a Compose for Desktop application. But it seems I'm facing a strange issue, which should be really related to my coding anti-patterns I guess. More in the thread 🧵 .
    d
    • 2
    • 14
  • d

    dimsuz

    03/25/2023, 4:45 PM
    Is there a way to "query" current pointer (cursor) position? For example: user clicks, I query and do some stuff depending on where the cursor is. I know I can constantly track it using
    Modifier.onPointerEvent
    and save it to mutableStateOf, but that sounds like a bit of an overkill for cases when I want to only react on clicks.
    a
    m
    • 3
    • 4
  • l

    loloof64

    03/25/2023, 6:10 PM
    I would like to use Firebase in my Jetpack Compose for Desktop project : so is fine to create an Android application from the Firebase console in order to use it ? Or should I create a Web application ?
    m
    f
    s
    • 4
    • 10
  • m

    Marcello Galhardo

    03/26/2023, 3:27 PM
    Out of curiosity: why the Compose Multiplatform plugin generates a new project with the Multiplatform module called “common” but Kotlin Mobile plugin generates it named “shared”? Is there any distinction between these two, or just naming?
    h
    n
    a
    • 4
    • 3
  • n

    Nish Patel

    03/27/2023, 5:57 PM
    Hi team, i'm trying out to make a desktop app but I need a database with in it? could someone tell if this is even possible?
    a
    j
    +3
    • 6
    • 6
  • a

    adte

    03/29/2023, 1:53 AM
    I have a question with using SQLDelight in a Compose desktop app. Right now, my main function instantiates ApplicationState -> WindowState -> etc. Where do you usually instantiate the Database object and add initial content to it? And do you do that in a Repository singleton with Kotlin flows? Just wondering if there's some sample app that people can share. Thanks!
Powered by Linen
Title
a

adte

03/29/2023, 1:53 AM
I have a question with using SQLDelight in a Compose desktop app. Right now, my main function instantiates ApplicationState -> WindowState -> etc. Where do you usually instantiate the Database object and add initial content to it? And do you do that in a Repository singleton with Kotlin flows? Just wondering if there's some sample app that people can share. Thanks!
View count: 1