Skip to content

Commit

Permalink
Merge pull request #167 from pop-os/relative-pointer_jammy
Browse files Browse the repository at this point in the history
Send `relative_pointer` in frame with `pointer`; update Smithay
  • Loading branch information
Drakulix authored Sep 8, 2023
2 parents f6ea7fa + 6247918 commit bc3c304
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ debug = true
lto = "fat"

[patch."https://github.com/Smithay/smithay.git"]
smithay = { git = "https://github.com/smithay//smithay", rev = "36a0ec69b1" }
smithay = { git = "https://github.com/smithay//smithay", rev = "1a61e1c13a" }
22 changes: 12 additions & 10 deletions src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,24 +498,26 @@ impl State {
}
}
let ptr = seat.get_pointer().unwrap();
ptr.motion(
self,
under.clone(),
&MotionEvent {
location: position,
serial,
time: event.time_msec(),
},
);
// Relative motion is sent first to ensure they're part of a `frame`
// TODO: Find more correct solution
ptr.relative_motion(
self,
under,
under.clone(),
&RelativeMotionEvent {
delta: event.delta(),
delta_unaccel: event.delta_unaccel(),
utime: event.time(),
},
);
ptr.motion(
self,
under,
&MotionEvent {
location: position,
serial,
time: event.time_msec(),
},
);
#[cfg(feature = "debug")]
if self.common.seats().position(|x| x == &seat).unwrap() == 0 {
let location = if let Some(output) = self.common.shell.outputs.first() {
Expand Down

0 comments on commit bc3c304

Please sign in to comment.