Skip to content

Commit

Permalink
MonitorAddedV2 can return negative integers
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer committed Jan 12, 2025
1 parent 9e7d409 commit c6d06f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event_listener/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ pub struct ChangedSpecialEventData {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MonitorAddedEventData {
/// The monitor's id
pub id: u8,
pub id: i8,
/// The monitor's name
pub name: String,
/// the monitor's description
Expand Down Expand Up @@ -805,7 +805,7 @@ pub(crate) fn event_parser(event: String) -> crate::Result<Vec<Event>> {
}
ParsedEventType::MonitorRemoved => Ok(Event::MonitorRemoved(get![args;0])),
ParsedEventType::MonitorAddedV2 => Ok(Event::MonitorAdded(MonitorAddedEventData {
id: parse_int!(get![ref args;0], event: "MonitorAddedV2" => u8),
id: parse_int!(get![ref args;0], event: "MonitorAddedV2" => i8),
name: get![args;1],
description: get![args;2],
})),
Expand Down

0 comments on commit c6d06f4

Please sign in to comment.