Skip to content

[macos] Enable acceptsFirstMouse #88915

@sgehrman

Description

@sgehrman

Currently macOS apps made with Flutter require a click to activate the window first, then another click to click on a button.

Most of the time this is what you want, but some apps (like floating utility apps) need the first click to activate the window and send the click to Flutter.

Also if you have a custom drag area in your Flutter window, you need the ability to click and drag un-active windows.

Inside FlutterView.mm we need a way to enable this:

  • (BOOL)acceptsFirstMouse:(NSEvent*)event {
    return YES;
    }

I compiled the engine and testing this and it works. But probably not everyone will want "YES" so we need a way to turn this on or off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopa: qualityA truly polished experiencec: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.platform-macBuilding on or for macOS specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions