Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep adding interop order consistent between platforms #1143

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -453,14 +453,15 @@ internal class ComposeSceneMediator(

@OptIn(ExperimentalSkikoApi::class)
private fun JLayeredPane.addToLayer(component: Component, layer: Int) {
val index = 0 // AWT renders it in the reverse order, so insert it to beginning
if (renderApi == GraphicsApi.METAL && contentComponent !is SkiaSwingLayer) {
// Applying layer on macOS makes our bridge non-transparent
// But it draws always on top, so we can just add it as-is
// TODO: Figure out why it makes difference in transparency
add(component, 0)
add(component, index)
} else {
setLayer(component, layer)
add(component, null, -1)
add(component, null, index)
}
}

Expand Down