Skip to content

Commit 56ee252

Browse files
authored
fix windows panic on -1 size (#946)
1 parent 31b3998 commit 56ee252

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/event/source/windows.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ impl EventSource for WindowsEventSource {
6666
InputRecord::WindowBufferSizeEvent(record) => {
6767
// windows starts counting at 0, unix at 1, add one to replicate unix behaviour.
6868
Some(Event::Resize(
69-
record.size.x as u16 + 1,
70-
record.size.y as u16 + 1,
69+
(record.size.x as i32 + 1) as u16,
70+
(record.size.y as i32 + 1) as u16,
7171
))
7272
}
7373
InputRecord::FocusEvent(record) => {

0 commit comments

Comments
 (0)