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

On macOS, add WindowExtMacOS::reset_cursor_rect #613

Closed
wants to merge 2 commits into from
Closed

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented Nov 2, 2022

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@wusyong wusyong requested a review from a team as a code owner November 2, 2022 14:53
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

I am not sure if this fix will be accepted upstream, how would this be used in WRY btw?

@wusyong
Copy link
Member Author

wusyong commented Nov 4, 2022

@amrbashir wry will call window.reset_cursor_rect(false) internally when creating webview.
I don't know if upstream would accept either. But this is the only I can think of without replacing TaoView.
Replacing TaoView will lose lost of WindowEvent including resize event.

@amrbashir
Copy link
Member

calling window.reset_cursor_rect(false) will effectively disable window.set_cursor_icon()?

@wusyong
Copy link
Member Author

wusyong commented Nov 4, 2022

Yes, this is resetCursorRects: is used for loading custom cursor in TaoView.
Wen set_cursor_icon is called, it will invoke invalidateCursorRectsForView: which will trigger resetCursorRects:

@amrbashir
Copy link
Member

I don't think users will appreciate disabling the window.set_cursor_icon, maybe window.set_cursor_icon could be changed to take Option<CusrsorIcon> and calling it with None variant will make tao/winit fallback to the system behavior.

@wusyong wusyong closed this Nov 6, 2022
@wusyong wusyong deleted the reset-cursor branch November 6, 2022 10:56
@wusyong
Copy link
Member Author

wusyong commented Nov 6, 2022

Closed this in favor of #614

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