https://kotlinlang.org logo
Title
x

xxfast

05/20/2022, 7:08 AM
is there a way to have a platform-native context menu (right-click menu)?
something like on the right, that can render outside of the window
k

Kirill Grouchnikov

05/20/2022, 12:32 PM
These two are separate concepts. Do you want a Compose pop-up that can go outside the window bounds or do you want to invoke a platform native pop-up?
x

xxfast

05/20/2022, 1:31 PM
I want the platform native pop-up
k

Kirill Grouchnikov

05/20/2022, 1:44 PM
Then you'd need to find those platform-specific APIs for each platform and provide JNI bindings for them.
a

Alexander Maryanovsky

05/20/2022, 8:03 PM
and how do you do the former?
k

Kirill Grouchnikov

05/20/2022, 8:43 PM
What's the former? A Compose popup that goes outside the main window bounds?
a

Alexander Maryanovsky

05/20/2022, 10:15 PM
Yes
k

Kirill Grouchnikov

05/20/2022, 10:48 PM
You would use a
ComposeWindow
, configuring its size and position based on your content, your anchor location and the screen size.