Can I access the parent window in a composition?
# compose-desktop
a
Can I access the parent window in a composition?
Hmm,
LocalLayerContainer
is
internal
. Otherwise I could’ve done
Copy code
SwingUtilities.getWindowAncestor(LocalLayerContainer.current)
LocalWindow
is also
internal
k
WindowScope
functions have access to
.window
a
Sure, but I can't access it deep in the tree without passing it there somehow.
k
Technically you can set it as your own composition local up top and then get it when you need in the hierarchy.
a
Yep, that's my plan