Skip to content
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

Add CreateSurfaceFromHwnd to Windows.UI.Composition #3859

Open
zhuman opened this issue Dec 24, 2020 · 4 comments
Open

Add CreateSurfaceFromHwnd to Windows.UI.Composition #3859

zhuman opened this issue Dec 24, 2020 · 4 comments
Labels
feature proposal New feature proposal product-winui3 WinUI 3 issues team-CompInput Issue for IXP (Composition, Input) team

Comments

@zhuman
Copy link

zhuman commented Dec 24, 2020

A major barrier I would have to using WinUI right now is the inability to host a child HWND - or even better, bring back the IDCompositionDeviceDesktop::CreateSurfaceFromHwnd as a new function in Windows.UI.Composition to host layered child windows. Bringing CreateSurfaceFromHwnd into the new API would solve so many issues with hosting third-party plug-ins, the "airspace problem", and enable people to integrate old UI technologies seamlessly with composition blends and animation. As an example, every audio application that supports third-party VST controls needs to be able to host HWNDs in some way, as this is the interop mechanism provided by the standard.

Right now the closest I could come would be to host WinUI in another framework - the reverse. This has its own issues, particularly around performing layout/arrangement of the WinUI parts with the HWND. It also makes it impossible to use WinUI "around" child HWNDs since you can only have one island today, and even with multiple islands things would get really unwieldy.

Please consider CreateSurfaceFromHwnd! (I know it's actually internally used heavily by the Windows shell with Windows.UI.Composition, so this is a request to make it public!)

Originally posted by @zhuman in #719 (comment)

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Dec 24, 2020
@YuliKl YuliKl added the feature proposal New feature proposal label Dec 28, 2020
@YuliKl YuliKl added the needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) label Dec 28, 2020
@ranjeshj ranjeshj added team-CompInput Issue for IXP (Composition, Input) team needs-triage Issue needs to be triaged by the area owners and removed needs-triage Issue needs to be triaged by the area owners labels Jan 6, 2021
@ranjeshj
Copy link
Contributor

ranjeshj commented Jan 6, 2021

@jeffstall as FYI

@mfkl
Copy link

mfkl commented Nov 2, 2021

Yes, we are interested in this for proper LibVLC support as well.

@selastingeorge
Copy link

Looks like this might not be happening any soon so it's better to use DWM private API's to achieve it. Windows.UI.Composition Thumbnail

@pratikone pratikone added product-winui3 WinUI 3 issues and removed needs-winui-3 Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3) needs-triage Issue needs to be triaged by the area owners labels Oct 14, 2022
@HO-COOH
Copy link

HO-COOH commented Mar 26, 2024

2024 now and I am still waiting for this to happen.
How Arc browser is able to seemingly achieve this is still a myth. (This pop up is not a window, so if they host the chrome window as the normal child-window way, it will block the pop up)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal product-winui3 WinUI 3 issues team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

7 participants