Skip to content

Commit

Permalink
fix windows panic on -1 size (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciek50322 authored Nov 22, 2024
1 parent 31b3998 commit 56ee252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event/source/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 56ee252

Please sign in to comment.