From 56ee252fe1ac3e03d63aa6db4b7fc822a4cdc828 Mon Sep 17 00:00:00 2001 From: maciek50322 <34212298+maciek50322@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:39:48 +0100 Subject: [PATCH] fix windows panic on -1 size (#946) --- src/event/source/windows.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event/source/windows.rs b/src/event/source/windows.rs index 33ecffe7..fa40cc50 100644 --- a/src/event/source/windows.rs +++ b/src/event/source/windows.rs @@ -66,8 +66,8 @@ impl EventSource for WindowsEventSource { InputRecord::WindowBufferSizeEvent(record) => { // windows starts counting at 0, unix at 1, add one to replicate unix behaviour. Some(Event::Resize( - record.size.x as u16 + 1, - record.size.y as u16 + 1, + (record.size.x as i32 + 1) as u16, + (record.size.y as i32 + 1) as u16, )) } InputRecord::FocusEvent(record) => {