From afec0f20fd79304bbaf6a81968080d12376e7e85 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 24 Mar 2024 11:47:37 -0700 Subject: [PATCH] docs: Clarify Win32 handle validity This commit clarifies what is expected by the system for a Win32 handle. It is expected that the Win32 handle belongs to the current thread. This is not a breaking change as it was previously necessary for the window to be considered "valid". cc https://github.com/rust-windowing/winit/pull/3593 Signed-off-by: John Nunley --- src/windows.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/windows.rs b/src/windows.rs index 52c6079..3595031 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -59,6 +59,10 @@ pub struct Win32WindowHandle { impl Win32WindowHandle { /// Create a new handle to a window. /// + /// # Safety + /// + /// It is assumed that the Win32 handle belongs to the current thread. This + /// is necessary for the handle to be considered "valid" in all cases. /// /// # Example ///