Skip to content

Commit

Permalink
docs: Clarify Win32 handle validity
Browse files Browse the repository at this point in the history
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 rust-windowing/winit#3593

Signed-off-by: John Nunley <dev@notgull.net>
  • Loading branch information
notgull committed Mar 24, 2024
1 parent 83e5785 commit afec0f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/windows.rs
Expand Up @@ -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
///
Expand Down

0 comments on commit afec0f2

Please sign in to comment.