mirror of
https://github.com/danbulant/appit
synced 2026-06-24 17:11:54 +00:00
Provide access to Arc<winit:🪟:Window>
This simplifies managing safely accessing the raw window handle, allowing the window thread to pass a reference back to the app thread using an app event.
This commit is contained in:
parent
b95df0cc54
commit
662cebf193
2 changed files with 2 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
This new function properly updates the `inner_size` and `outer_size` when the
|
This new function properly updates the `inner_size` and `outer_size` when the
|
||||||
underlying window is resized immediately. Notably, this happens on Wayland but
|
underlying window is resized immediately. Notably, this happens on Wayland but
|
||||||
may happen on some other platforms as well.
|
may happen on some other platforms as well.
|
||||||
|
- `RunningWindow::winit` now returns an `Arc` wrapped winit window.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ where
|
||||||
{
|
{
|
||||||
/// Returns a reference to the underlying window.
|
/// Returns a reference to the underlying window.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn winit(&self) -> &winit::window::Window {
|
pub fn winit(&self) -> &Arc<winit::window::Window> {
|
||||||
&self.window
|
&self.window
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue