Skip to content

Commit

Permalink
Merge pull request Rust-SDL2#1368 from iddm/improve-the-window-interf…
Browse files Browse the repository at this point in the history
…ace-ux

Improve the UX of the Window interface.
  • Loading branch information
Cobrand authored Jan 30, 2024
2 parents 6a78af8 + 92732e4 commit 670bacf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sdl2/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ impl FlashOperation {
/// Note: If a `Window` goes out of scope but it cloned its context,
/// then the `SDL_Window` will not be destroyed until there are no more references to the `WindowContext`.
/// This may happen when a `TextureCreator<Window>` outlives the `Canvas<Window>`
#[derive(Clone)]
pub struct Window {
context: Rc<WindowContext>,
}
Expand Down Expand Up @@ -1324,7 +1325,7 @@ impl Window {

#[inline]
/// Create a new `Window` without taking ownership of the `WindowContext`
pub const unsafe fn from_ref(context: Rc<WindowContext>) -> Window {
pub const fn from_ref(context: Rc<WindowContext>) -> Window {
Window { context }
}

Expand Down

0 comments on commit 670bacf

Please sign in to comment.