I encountered what seems like a bug when using tra...
# compose-desktop
s
I encountered what seems like a bug when using transparent dialog windows. I have a typical 'are you sure you want to quit' modal when attempting to close the application. this is done via a transparent dialog which then has a box with
Copy code
Modifier.fillMaxSize().background(Color.Black.copy(alpha = 0.5f))
When the parent window is floating, I get the expected result but whenever it's maximized the box is just plain black opposed to being transparent. However every time I create a transparent window I get
Failed to create DirectX12 device.
I assume this is the root of all evil or could it be caused by something else?
i
“Failed to create DirectX12 device.” is misleading, and always appeared when we try to create a transparent window on Windows. Currently Compose only supports transparent windows on OpenGL, hence we see that message. Broken transparency in maximized mode is probably a bug. You can report it here, or/and try to fix it in underlying skiko library and create a PR (we will appreciate it 🙂)
s
ohh I see. I was really confused about the warning in general, now I know why. fixing it is slightly beyond my capabilities I'm afraid, but I will file a report
👍 1
I just noticed that I can't open the dialog when moving the entire window to a different physical screen. app freezes completely. dialog's state is implemented like this:
Copy code
rememberDialogState(size = state.size, position = state.position)
state being:
Copy code
rememberWindowState(width = 1280.dp, height = 800.dp, placement = WindowPlacement.Floating)
also related to
transparent = true
. works if
false