Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more info about lwjgl integration #1738
base: master
Are you sure you want to change the base?
Add more info about lwjgl integration #1738
Changes from 2 commits
3d2d62c
706bab1
749d277
5a690e8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LocalLayerContainer
is internal. Please describe in this doc how you use it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rememberCursorPosition
is using AWT to get mouse position, in an app with ComposeSence, currently, the only way to make cursor related feature (ContextMenu, CursorPopup, Tooltip) work is to provide a fake AWT Container and update window bound and position for the fake container, and you need to implement your own window region detection, render scaling, etc.This can be removed or changed if we could have something
LocalMouseLocationProvider
mentioned in #1736There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, how do you able to use/access
LocalLayerContainer
? It is marked as internal, so you can't access it in default Gradle/Kotlin configuration. Do you add some arguments to Kotlin compiler?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just create a fake class and override in the classpath(Gradle default duplicate strategy should work). My current workaround is to create a package
androidx.compose.ui.awt
and create a fileLocalLayerContainer.desktop.kt
I am also trying to make a kotlin compiler plugin to remove all access modifiers and make everything public open.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart :). Could you add this into the doc?
Also, could you describe in
## Problems
that this section contains only temporary workarounds, that won't needed when Compose resolves these problems.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we use
CompositionLocalProvider
to passawtContainer
when I try to run:
How have you solved it?
## Problems
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, weird. I didn't run into a null pointer error (with ComposeSence).
It might be caused by AWT headless property, try
System.setProperty("java.awt.headless", "false")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can avoid classpath hacks with just using
@Suppress("INVISIBLE_MEMBER")
on use-site.