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

XEmbed support #1149

Closed
chrisduerr opened this issue Sep 8, 2019 · 3 comments · Fixed by #3017
Closed

XEmbed support #1149

chrisduerr opened this issue Sep 8, 2019 · 3 comments · Fixed by #3017
Labels
C - needs investigation Issue must be confirmed and researched P - low Nice to have S - api Design and usability S - enhancement Wouldn't this be the coolest?

Comments

@chrisduerr
Copy link
Contributor

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 (alacritty/alacritty#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.

@Osspial
Copy link
Contributor

Osspial commented Sep 8, 2019

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.

@chrisduerr
Copy link
Contributor Author

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.

@Osspial Osspial added P - low Nice to have C - needs investigation Issue must be confirmed and researched S - api Design and usability S - enhancement Wouldn't this be the coolest? labels Sep 8, 2019
@chrisduerr
Copy link
Contributor Author

Alacritty has just landed support for this, so an implementation for X11 can be found here:

alacritty/alacritty#2786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs investigation Issue must be confirmed and researched P - low Nice to have S - api Design and usability S - enhancement Wouldn't this be the coolest?
Development

Successfully merging a pull request may close this issue.

3 participants