8000 Support multiple windows for desktop shells · Issue #30701 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support multiple windows for desktop shells #30701

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
stuartmorgan-g opened this issue Apr 8, 2019 · 140 comments
Open

Support multiple windows for desktop shells #30701

stuartmorgan-g opened this issue Apr 8, 2019 · 140 comments
Labels
a: desktop Running on desktop a: multi window Issues related to multi window support c: new feature Nothing broken; request for a new capability customer: chalk (g3) customer: crowd Affects or could affect many people, though not necessarily a specific customer. engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-linux Building on or for Linux specifically platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@stuartmorgan-g
Copy link
Contributor

See discussion in google/flutter-desktop-embedding#98

If we end up supporting multiple root views within one engine instance, this will require embedding API changes. If we don't, we'll need to have a viable strategy to recommend for coordinating between windows that works for cases that require constant synchronization (e.g., a tools palette in one window, with the canvas using those tools in another)

@stuartmorgan-g stuartmorgan-g added platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically platform-linux Building on or for Linux specifically e: desktop labels Apr 8, 2019
@stuartmorgan-g stuartmorgan-g added the engine flutter/engine repository. See also e: labels. label Apr 8, 2019
@ghost

This comment has been minimized.

@rodydavis
Copy link
Contributor

Maybe as a proof concept we could start with alert popups that open a separate window and can be dragged.

Maybe like a Cupertino popover since they carry their own navigation internally on iPads.

https://gist.github.com/AppleEducate/6f2a1188d6256b0eff79131891ce92f1

@stuartmorgan-g
Copy link
Contributor Author

The place to start is agreement on, and design for, the technical approach that will be used to support multiple windows on desktop. A proof of concept can't come before a decision on what to build.

@rodydavis
Copy link
Contributor

Very true. 👍🏼

@handicraftsman
Copy link
handicraftsman commented May 11, 2019

In OpenGL applications there is a need to call a method called like MakeContextCurrent (different in every windowing API), thus i think it would be a nice idea to have some keyed contexts whose keys can be sent to the embedder to switch to the context. Although there is a problem with event handling - embedders would need to translate internal window system ids into context keys so flutter understands which window should receive the event. That means that both flutter and embedder must have 1-2 maps to identify the context keys.

@stuartmorgan-g stuartmorgan-g added a: desktop Running on desktop and removed e: desktop labels Jul 26, 2019
@stuartmorgan-g stuartmorgan-g added the c: new feature Nothing broken; request for a new capability label Aug 5, 2019
@stuartmorgan-g stuartmorgan-g added this to the Stretch Goals milestone Aug 13, 2019
@GregorySech
Copy link

Does this have any implication on how web handles multiple tabs?

@stuartmorgan-g
Copy link
Contributor Author

I think that's a fundamentally different question that multi-view on desktop. It's possible that depending on what decision is made for web there might some internal aspects that would be the same, but without high-level designs for both it's hard to say.

It certainly should be tracked as a separate issue from this, since much of the work would not be the same regardless.

@pavanpodila
Copy link

This is a deal breaker for an app I want to port from Swift to Flutter. Curious to hear if this is a priority for the team ?

@rodydavis
Copy link
Contributor

Why not do add to app? You can keep your swift code and slowly migrate over!

@pavanpodila
Copy link

You mean embed in the Swift app? The app itself is multi window by design. Embedding could be an option if this is going to take time. Also just a side question: does it support transparent windows with click through?

@rodydavis
8000 Copy link
Contributor

Not sure, but i know it is a good option for existing apps! https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps

That way the UI could be in Flutter and window management done by swift

@stuartmorgan-g
Copy link
Contributor Author

We're aware that this is a critical feature for a category of applications. That said, there are still many critical features not yet implemented for desktop. This is one of many priorities; it's not currently the top priority.

@stuartmorgan-g stuartmorgan-g modified the milestones: Stretch Goals, Goals Sep 12, 2019
@cosmotek
Copy link

What about a CSP-like approach? Provide a spawnWindow function similar to the existing runApp function, and some sort of IPC mechanism. Or better yet, use runApp itself (probably with opts).

@rodydavis
Copy link
Contributor

Here is a simple example for MacOS I created that modifies the AppDelegate and allows you to create and communicate between windows: https://github.com/rodydavis/multi_window

8000

@wanjm

This comment was marked as off-topic.

@czy-29

This comment was marked as off-topic.

@RossComputerGuy
Copy link
Contributor

Looks like 3.33 will have multi-view stuff included in the embedder so there's progress there.

@giaur500

This comment was marked as off-topic.

@wanjm

This comment was marked as off-topic.

@RossComputerGuy
Copy link
Contributor

@wanjm Typo, 3.23 if I'm looking at this commit's tags right. flutter/engine@de89124

@wanjm

This comment was marked as off-topic.

@xland

This comment was marked as off-topic.

@wanjm

This comment was marked as off-topic.

@giaur500

This comment was marked as off-topic.

@brandon3343

This comment was marked as off-topic.

@giaur500

This comment was marked as off-topic.

@stuartmorgan-g
Copy link
Contributor Author

I would like to once again remind everyone to read https://github.com/flutter/flutter/blob/master/docs/contributing/issue_hygiene/README.md before commenting. In particular:

Comments should be reserved for making progress on the issue.

If this issue continues to attract a significant number of unproductive comments, we will have to lock the issue.

@Im-Kevin
Copy link
Contributor

Can this problem be further improved with the help of the community?

@loic-sharma loic-sharma added the triaged-macos Triaged by the macOS platform team label Jul 3, 2024
@flutter-triage-bot flutter-triage-bot bot removed fyi-macos For the attention of macOS platform team triaged-macos Triaged by the macOS platform team labels Jul 3, 2024
@lingg4556

This comment was marked as off-topic.

@orestesgaolin
Copy link
Contributor

I think it may be worth linking this message from Canonical and subsequent responses

#142845 (comment)

@czy-29
Copy link
czy-29 commented Jan 24, 2025

Are there any plans for this feature in 2025?

@Saviq
Copy link
Saviq commented Jan 28, 2025

@czy-29 we're actively working on this, see:

https://docs.flutter.dev/go/multi-window-api

And the RFC PR:

NB: this is in big flux, so things may be broken at times, we're planning to put up a PR for proper review in a week or two.

@Wanna-Pizza

This comment has been minimized.

@stan-at-work

This comment has been minimized.

@stuartmorgan-g

This comment has been minimized.

@FMorschel

This comment has been minimized.

@stan-at-work

This comment has been minimized.

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: multi window Issues related to multi window support c: new feature Nothing broken; request for a new capability customer: chalk (g3) customer: crowd Affects or could affect many people, though not necessarily a specific customer. engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-linux Building on or for Linux specifically platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
Status: In Progress
Development

No branches or pull requests

0