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

A minor fix for sendInputEvent and improvements related to cursor-changed event #6661

Merged
merged 7 commits into from
Aug 1, 2016

Conversation

brenca
Copy link
Contributor

@brenca brenca commented Jul 31, 2016

Fixes and improvements for the following:

  • Because of some changes, we were unable to send UTF-8 characters with sendInputEvent
  • The cursor-changed event was missing some data needed for custom cursors (hotspot + size of cursor)
  • To be able to draw the cursor easily, I introduced a ToBUFFER to NativeImage that retrieves the image in a raw representation into a NodeBuffer

@@ -1299,6 +1299,8 @@ void WebContents::OnCursorChange(const content::WebCursor& cursor) {
if (cursor.IsCustom()) {
Emit("cursor-changed", CursorTypeToString(info),
gfx::Image::CreateFrom1xBitmap(info.custom_image),
gfx::Rect(info.custom_image.width(), info.custom_image.height()),
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use gfx::Size here.

@brenca
Copy link
Contributor Author

brenca commented Aug 1, 2016

@zcbenz I've corrected my bloopers and added documentation, thanks for the review :)

@zcbenz
Copy link
Contributor

zcbenz commented Aug 1, 2016

👍

@zcbenz zcbenz merged commit 1d33275 into electron:master Aug 1, 2016
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