Fixes #15389, added docs to RawHandleWrapper::_window field (#18832)

# Objective

- Fixes https://github.com/bevyengine/bevy/issues/15389.
- Add documentation for RawHandleWrapper::_window field since It's
needed to drop the window at the correct time.

## Solution

- Added documentation to RawHandleWrapper::_window field as same as
WindowWrapper documentation.

## Testing

- No testing needed since it is documentation. 

---
This commit is contained in:
mhsalem36 2025-04-28 14:44:57 -07:00 committed by GitHub
parent 7f9eae2c87
commit 2556405feb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,10 @@ impl<W: 'static> Deref for WindowWrapper<W> {
/// thread-safe.
#[derive(Debug, Clone, Component)]
pub struct RawHandleWrapper {
/// A shared reference to the window.
/// This allows us to extend the lifetime of the window,
/// so it doesnt get eagerly dropped while a pipelined
/// renderer still has frames in flight that need to draw to it.
_window: Arc<dyn Any + Send + Sync>,
/// Raw handle to a window.
window_handle: RawWindowHandle,