Skip to content

Commit 670bacf

Browse files
authored
Merge pull request #1368 from iddm/improve-the-window-interface-ux
Improve the UX of the Window interface.
2 parents 6a78af8 + 92732e4 commit 670bacf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sdl2/video.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ impl FlashOperation {
688688
/// Note: If a `Window` goes out of scope but it cloned its context,
689689
/// then the `SDL_Window` will not be destroyed until there are no more references to the `WindowContext`.
690690
/// This may happen when a `TextureCreator<Window>` outlives the `Canvas<Window>`
691+
#[derive(Clone)]
691692
pub struct Window {
692693
context: Rc<WindowContext>,
693694
}
@@ -1324,7 +1325,7 @@ impl Window {
13241325

13251326
#[inline]
13261327
/// Create a new `Window` without taking ownership of the `WindowContext`
1327-
pub const unsafe fn from_ref(context: Rc<WindowContext>) -> Window {
1328+
pub const fn from_ref(context: Rc<WindowContext>) -> Window {
13281329
Window { context }
13291330
}
13301331

0 commit comments

Comments
 (0)