X11 supports embedding windows into each other, which is something that has been requested by a few Alacritty users. I'd say this is probably not something very commonly used and rather niche, so I was curious if winit had interest for supporting it.
There already is a PR for adding this on the Alacritty side (https://github.com/jwilm/alacritty/pull/2786), however it seems to me that I should at least inquire if winit is interested in it. That way we could potentially implement it for more than just Alacritty itself.
Since this is an X11 thing only and it is extremely niche, I feel like it might conflict with winit's simpler approach to things, so maybe the recommended solution would be an external library? Though in that case it's probably going to stay in Alacritty only for now.
The Windows API actually exposes something extremely similar, albeit under a different name: you can create child windows that are confined to the client area of a parent window. I'd definitely be interested in exposing this if all the desktop platforms we support expose APIs for it, but I don't know what the situation looks like for Wayland and macOS.
That being said, if we do decide to support it, I don't expect it to land on master for quite a while. I'm willing to write up the code for this on Windows, but it's hard to drum up the motivation to implement more Winit features when we've already got several features waiting on cross-platform support before they can be stabilized. It's probably safe to go ahead and accept that PR in the meanwhile.
Oh, I wasn't aware that something similar exists on Windows. I thought this would be mostly supported through the Unix window Ext, which would make cross-platform support less relevant.
I think there's no harm in keeping this open then I guess, maybe with a low priority, just to track it for the future? We can always delete code in Alacritty so that's not a problem.
Alacritty has just landed support for this, so an implementation for X11 can be found here:
Most helpful comment
Alacritty has just landed support for this, so an implementation for X11 can be found here:
https://github.com/jwilm/alacritty/pull/2786