fix: Implement raw-window-handle traits for X11Window (#50768)
Gary Tierney
created
I'm embedding a 3D viewport inside GPUI by creating a child window with
its own surface that fits the bounds of a GPUI element, and I need
access to the raw window handle of the current window to manage it.
Right now on X11 this is stubbed as unimplemented and results in a
panic. I've copied most of the same implementation from the associated
`RawWindow` into `X11Window`.
Small clip of a Bevy app embedded inside GPUI with a popover that draws
above the 3d surface to show testing was done:
[Screencast_20260304_182657.webm](https://github.com/user-attachments/assets/829f9197-1613-41a7-af83-d377f3154751)
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Added implementations of `rwh::HasDisplayHandle` and
`rwh::HasWindowHandle` for `X11Window`