compose-multiplatform
compose-multiplatform copied to clipboard
Allow z-ordering with Swing interop
Interop with Swing means any Swing content embedded in a Compose panel will always be at the top (max z-order). Content should be composited with the right z-order instead.
Is this issue related: https://github.com/JetBrains/compose-multiplatform/issues/1521
Yes it is in the premise, but that user then talks about issues with (lack of) recomposition when applying a workaround to try and solve the root problem, the lask of z-ordering APIs. The core issue has not been solved yet, as the documentation states:
A SwingPanel is a wrapper that controls the size, position and rendering of a Swing component that is placed on top of a Compose Multiplatform component, meaning the component inside a SwingPanel will always be on top of the Compose in depth. Anything that is misplaced and rests on the SwingPanel will be clipped by the Swing component placed there, so try to think about these situations, and if there is such a risk, then it is better to either redesign the UI accordingly, or stop using the SwingPanel and still try to implement the missing component, thereby contributing to the development of technology and making life easier for other developers.
From here
:scream: The issue makes AlertDialog(KMP 1.5) can not use with Swing too
Partially fixed in https://github.com/JetBrains/compose-multiplatform-core/pull/915. That change doesn't fix "z-order" itself, but changes a way to "clip the hole" for an interop component, so the content above it won't be affected anymore.