Hi, was SwingPanel always on top issue fixed? <htt...
# compose-desktop
s
Hi, was SwingPanel always on top issue fixed? https://github.com/JetBrains/compose-multiplatform/issues/2926
For me it is still on top.
Copy code
Box(
    modifier = modifier,
    contentAlignment = Alignment.Center,
) {
    content(this) //Swing panel or Exoplayer or AvPlayer

    if (state.playbackState == PlaybackState.BUFFERING.ordinal && !state.controlsVisible) {
        BufferIndicator(modifier = Modifier.align(Alignment.Center))
    }

    MediaControlGestures(
        state,
        modifier = Modifier.matchParentSize(),
    ) { event ->
        handlePlayerEvent(event)
    }

    MediaControlButtons(
        state,
        modifier = Modifier.matchParentSize(),
    ) { event ->
        handlePlayerEvent(event)
    }
}
In desktop cant see my other UI components which should be on top unless i make swingpanel size 0dp. Works fine in Android and IOS.
Copy code
kotlin = "1.9.22"
compose = "1.6.4"
a
@Ivan Matkov
i
You're mixing a few different things here. And there is no simple answer for all cases. What was fixed: 1. Sorting interop components in the AWT hierarchy to match Compose order. See https://github.com/JetBrains/compose-multiplatform-core/pull/1145 2. Add a way to place interop view like we have on iOS - under the Compose canvas and drawing transparent hole. It's under the flag since there are OS level limitations of blending GPU accelerated views. See https://github.com/JetBrains/compose-multiplatform-core/pull/915 Based on the code above, (2) is most likely what you're looking for
or AvPlayer
There are a huge difference what type of view you're trying to place. There are 3 types here: swing lite-weight components, system "heavyweight" and GPU accelerated ones.
compose = "1.6.4"
There is no such version of Compose Multiplatform, it's probably Google's Jetpack compose for Android version Also see my comment regarding video players here: https://github.com/JetBrains/compose-multiplatform/issues/4389#issuecomment-1970570215