Hey, I'm building a desktop application that I wan...
# compose-desktop
s
Hey, I'm building a desktop application that I want to display when I stream on Twitch. There's a main app window and a secondary window that is used as a surface to render things that will be shown on the stream. I use OBS to capture and stream, but it's currently unable to see my window content. I just get a plain white box the same size as the window, and no content. The content is visible to me on my monitor. I've tried making my window all allowed combinations of
transparent
,
undecorated
, and
focusable
but that doesn't fix it. If I set the window to
undecorated
and
transparent
then the white box disappears from OBS, but the content of the windows is still not displayed. This is what the setting used to be last time this worked for me. I left the project untouched for a long time, and only recently noticed this part stopped working. Since then I've upgraded to Windows 11 from 10, upgraded OBS, and bumped the Compose dependency version to 1.6.10, so I'm not exactly sure what the breaking change was. Has anyone else had a similar issue with capturing their window content? FWIW OBS captures most other windows just fine (e.g. Firefox, Discord, IntelliJ Idea), but one exception is the file explorer called Files, that also appears blank.
Keeping notes here as I go in case someone else comes here and finds this post. I've checked out the Compose Spotify Desktop repo and I can confirm that it shows up in OBS just fine, so there's something unique to my code that appears to be causing this. I'm going to spend some time figuring out what it is, and if I find more information I'll post another update.
The Aurora demo project fails to show up in OBS. It uses 1.6.10, same as my project.
This project with version 1.5.10 does not show up correctly in OBS.
Downgraded my own project to:
compose = "1.3.1"
kotlin = "1.8.10"
kodein-di = { group = "org.kodein.di", name = "kodein-di", version = "7.19.0" }
Also set the window properties like so:
Copy code
Window(
        title = "Overlay",
        onCloseRequest = { isVisible = false },
        state = windowState,
        undecorated = true,
        transparent = true,
        visible = isVisible,
        focusable = false,
    )
Now OBS can see the window content correctly. Swapping the
undecorated
,
transparent
, and
focusable
properties makes the window show up as plain white.