Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WIP: FFI based multi-window support #167393

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

knopp
Copy link
Member

@knopp knopp commented Apr 18, 2025

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link

google-cla bot commented Apr 18, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine repository. See also e: labels. platform-windows Building on or for Windows specifically d: examples Sample code and demos platform-linux Building on or for Linux specifically a: desktop Running on desktop platform-macos labels Apr 18, 2025
@knopp knopp force-pushed the multiwindow_ffi_work branch from 72861c6 to ca898d1 Compare April 18, 2025 07:46
@knopp knopp requested a review from matanlurey as a code owner April 18, 2025 10:13
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests a: internationalization Supporting other languages or locales. (aka i18n) d: api docs Issues with https://api.flutter.dev/ f: integration_test The flutter/packages/integration_test plugin labels Apr 18, 2025
@justinmc
Copy link
Contributor

@knopp What's the main difference in the approach from #165072?

@knopp knopp force-pushed the multiwindow_ffi_work branch from 688b605 to bdb42d7 Compare April 21, 2025 11:34
@github-actions github-actions bot removed the platform-linux Building on or for Linux specifically label Apr 21, 2025
@ardera
Copy link
Contributor

ardera commented Apr 21, 2025

To use a custom WindowingOwner implementation, out-of-tree embedders would use a custom binding, right? Like this:

class MyBinding extends WidgetsFlutterBinding {
  static late final _instance = MyBinding();
  static MyBinding ensureInitialized() => _instance;

  @override
  WindowingOwner createWindowingOwner() {
    return FlutterpiWindowingOwner();
  }
}

And then how do you make use of that? Call MyBinding.ensureInitialized() before the app's main? (Similar to how plugin platform interfaces are currently registered)?

@knopp
Copy link
Member Author

knopp commented Apr 22, 2025

@ardera, given the feedback in #165072 I think we'll just make the defaultWindowingOwner writeable, no subclass needed.

@knopp knopp force-pushed the multiwindow_ffi_work branch from 602ca43 to fce7191 Compare May 6, 2025 17:56
@ardera
Copy link
Contributor

ardera commented May 7, 2025

@ardera, given the feedback in #165072 I think we'll just make the defaultWindowingOwner writeable, no subclass needed.

All good 👍 my concern would've just been that that makes it harder for apps to use custom widgets bindings. Other than that I actually like the approach of handling embedder-specific stuff in the bindings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: desktop Running on desktop a: internationalization Supporting other languages or locales. (aka i18n) a: tests "flutter test", flutter_test, or one of our tests d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos engine flutter/engine repository. See also e: labels. f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels. platform-macos platform-windows Building on or for Windows specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants