Skip to content
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

Don't rely on AWT in rememberCursorPositionProvider #432

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

Walingar
Copy link
Collaborator

@Walingar Walingar commented Mar 10, 2023

Proposed Changes

  • Introduces internal LocalPointerPositions that provides a way to get the current position of pointers. It is used in rememberCursorPositionProvider
  • rememberCursorPositionProvider doesn't rely on AWT anymore
  • Add tests for this functionality

Testing

Test: newly introduced TooltipAreaTest and DesktopCursorPositionTest

Issues Fixed

Fixes: JetBrains/compose-multiplatform#2821

)
}
val pointerPositions = LocalPointerPositions.current
val cursorPoint = remember { pointerPositions.entries.first().value.round() }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future when @igordmn will merge his changes about multi-touch support, we can filter by mouse here.

Walingar and others added 2 commits March 20, 2023 16:36
…ts instead

To implement it current pointer positions should be provided.
Add test for rememberCursorPositionProvider.

Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
@Walingar
Copy link
Collaborator Author

Walingar commented Mar 20, 2023

Rebased on Sasha's changes (squashed my commits into one), also removed some redundant waits. Some waits are still needed

@Walingar Walingar requested a review from m-sasha March 21, 2023 13:04
@Walingar Walingar merged commit 9349890 into jb-main Mar 22, 2023
@Walingar Walingar deleted the nr/tooltip-without-awt branch March 22, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rememberCursorPositionProvider - get rid of the dependency on AWT
3 participants