Skip to content

Commit

Permalink
added mouse scroll event to handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mihneabuz committed Aug 10, 2023
1 parent dbfe1b5 commit 68f1fa1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/ironrdp-server/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub enum MouseEvent {
RightReleased,
LeftPressed,
LeftReleased,
Scroll,
VerticalScroll { value: i16 },
}

/// Input Event Handler for an RDP server
Expand Down Expand Up @@ -103,6 +103,10 @@ impl From<MousePdu> for MouseEvent {
} else {
MouseEvent::RightReleased
}
} else if value.flags.contains(PointerFlags::VERTICAL_WHEEL) {
MouseEvent::VerticalScroll {
value: value.number_of_wheel_rotation_units,
}
} else {
MouseEvent::Move {
x: value.x_position,
Expand Down

0 comments on commit 68f1fa1

Please sign in to comment.