-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
It seems to me that this issue is not related to Flutter but a general issue (I noticed it on https://css-tricks.com/almanac/properties/c/cursor/). |
// The shape code values must be kept in sync with flutter's | ||
// rendering/mouse_cursor.dart | ||
switch (shapeCode) { | ||
case /* none */ 0x334c4a: |
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.
Can you define kShapeCodeX/Y/Z in engine and then use those codes in rendering/mouse_cursor instead?
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.
Is it possible to import engine code from framework at all? Also these constants have to be replicated to other platforms as well, including Android, macOS, GLFW, etc.
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.
They would be part of dart:ui , just like StrokeJoin or other consts/enums. @gspencergoog : how do you typically handle consts across the 2 repos?
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.
Yeah, actually, I think Ferhat is right: we should define the codes just as contiguous integers, and define an enum that matches in the Dart code.
StrokeJoin
defines an enum, and then in the C++/Java code, it defines constants that are used as indices into the StrokeJoin.values
member.
Then the only things that need to be kept in sync are the enum (which is in the engine repo in dart:ui), and the constants (which are also in the engine repo).
You can also look at ImageByteFormat
or TileMode
, or any of the other enums we use that way in the engine.
I noticed that resize cursors are missing from codes which are used very frequently for things like resizing dividers etc. Are you planning to add more ? The web list of cursors is probably a good set to look at. |
Yes, all cursors from CSS will be supported in an upcoming PR when the code styles are stabilized. This PR is a first step that aims to set up the infrastructure, and only include a small set of cursors to limit the scope of changes. |
The described bug is actually from macOS, and not related to Web whatsoever. |
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.
Please dartfmt. Thx!
I think Linux Fuchsia unit tests were a temporary breakage. I checked the LUCI , builds the current PRs are passing. May be we can sync to the head and re-run. |
Adds system mouse cursor to the web engine.
Still present in
|
Description
This PR adds system mouse cursor to the web engine.
This PR adds only a limited pool of system cursors. More will be added when the system is set up.
Related Issues
Known issues
The mouse position flickers when the cursor changes.
Update: This is not a Flutter issue, but a general issue of macOS
Entering:


Leaving: