Skip to content

Commit

Permalink
fix windows panic on -1 size
Browse files Browse the repository at this point in the history
  • Loading branch information
maciek50322 committed Nov 21, 2024
1 parent 4549831 commit e6f21cc
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 e6f21cc

Please sign in to comment.