Skip to content

Comments

Fix AwtCursor's equals and hashCode implementation for custom cursors#2613

Merged
m-sasha merged 1 commit intojb-mainfrom
m-sasha/fix-changing-custom-pointers
Dec 2, 2025
Merged

Fix AwtCursor's equals and hashCode implementation for custom cursors#2613
m-sasha merged 1 commit intojb-mainfrom
m-sasha/fix-changing-custom-pointers

Conversation

@m-sasha
Copy link

@m-sasha m-sasha commented Dec 2, 2025

Fix AwtCursor's equals and hashCode implementation for custom cursors, which prevented changing from one custom cursor to another (because they were equal).

Fixes https://youtrack.jetbrains.com/issue/CMP-9371

Testing

Added a unit test.

This should be tested by QA

Release Notes

Fixes - Desktop

  • Fix changing the pointer from one custom cursor to another.

@m-sasha m-sasha requested a review from igordmn December 2, 2025 13:28
@m-sasha
Copy link
Author

m-sasha commented Dec 2, 2025

As an alternative to identity equals, we could look at the cursor's name, but that doesn't feel right.

Typical implementations will probably not create many instances of custom Cursors, but even if they do, there doesn't seem to be much harm in unnecessarily changing between two identical cursors.

@m-sasha m-sasha merged commit a865d74 into jb-main Dec 2, 2025
16 checks passed
@m-sasha m-sasha deleted the m-sasha/fix-changing-custom-pointers branch December 2, 2025 14:14
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.

2 participants