What is the proper way to do something like absolu...
# compose-desktop
c
What is the proper way to do something like absolutely positioned elements? I'm trying to make a selection drop down. Another window element seems like it could work, but doesn't seem like the right choice.
k
Positioned and fully contained within the same window, or can it go outside the original window bounds?
c
Contained in the window
a
What about
Popup
? Setting the
popupPositionProvider
you can decide where to display it
c
Looks like PopUp can't go outside the window bounds
a
Didn't you want it contained in the window?
c
I mispoke, my bad 😅
k
Then it has to be hosted in its own window
c
Ah, ok
a
Ah 😂 then not sure if a
Dialog
can be an option, otherwise
Window
is the only other option I am aware of
c
I noticed that was causing some weird behavior in window previews on linux
Not sure how to phrase this question, but is there a way to hint to the OS that the extra window shouldn't be previewed?
sorry if that doesnt make sense 😅
And thank you both for your help
a
Yeah, I know what you mean. Not sure tbh, I guess it's sth that depends on the window manager or display server (no idea tho)
k
Try this
c
That seems to have done the trick!
thank you
should I be creating that via AwtWindow ?
k
I don't follow the question
c
I was following your advice along with this documentation here. They wrap the ComposableWindow in something like
Copy code
AwtWindow(creeate = { /* ComposableWindow Here */ }, dispose = {})
Without that the ComposableWindow isn't rendered to the screen, but I'm not sure if this is the correct way to do things
or what I should provide to the dispose argument
k
If you're doing an explicit
ComposeWindow
, you're in charge of configuring everything, including the size, position, and calling
isVisible = true
on it
You would also need to track clicks outside of its bounds and
Escape
key hits to dismiss the popup