Skip to content

[engine feature request] Support custom cursor engine API  #99484

@imiskolee

Description

@imiskolee

Hi,

I have tryimg write a custom cursor plugin now(https://github.com/imiskolee/flutter_custom_cursor), its work fine on macOS, but can not work on windows, I thinking it's related to windows message WM_SETCURSOR.

https://docs.microsoft.com/en-us/windows/win32/menurc/wm-setcursor

When I SetCursor from outside, it's worked once, but when we move the pointer, the cursor will be back to basic, theWM_SETCURSOR message will be triggered if the pointer moved,and the engine set cursor again.

https://github.com/flutter/engine/blob/main/shell/platform/windows/window_win32.cc#L364.

so, can we has a public engine API for plugin to manually set cursor?

somethings like:

void FlutterWindowWin32::UpdateFlutterCursor(HCURSOR cursor) {
  current_cursor_ = cursor;
}

Originally posted by @imiskolee in #31952 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.platform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions