( &mut self, event: I::PointerMotionEvent, )
| 2645 | } |
| 2646 | |
| 2647 | pub fn pointer_motion<I: InputBackend>( |
| 2648 | &mut self, |
| 2649 | event: I::PointerMotionEvent, |
| 2650 | ) -> anyhow::Result<()> { |
| 2651 | let serial = SERIAL_COUNTER.next_serial(); |
| 2652 | let delta = (event.delta_x(), event.delta_y()).into(); |
| 2653 | |
| 2654 | self.set_input_focus_auto(); |
| 2655 | |
| 2656 | if let Some(ptr) = self.seat.get_pointer() { |
| 2657 | let location = self.workspaces.current().clamp_coords(ptr.current_location() + delta); |
| 2658 | |
| 2659 | let under = self.surface_under(); |
| 2660 | |
| 2661 | ptr.motion( |
| 2662 | self, |
| 2663 | under.clone(), |
| 2664 | &MotionEvent { location, serial, time: event.time_msec() }, |
| 2665 | ); |
| 2666 | |
| 2667 | ptr.relative_motion( |
| 2668 | self, |
| 2669 | under, |
| 2670 | &RelativeMotionEvent { |
| 2671 | delta, |
| 2672 | delta_unaccel: event.delta_unaccel(), |
| 2673 | utime: event.time(), |
| 2674 | }, |
| 2675 | ) |
| 2676 | } |
| 2677 | |
| 2678 | Ok(()) |
| 2679 | } |
| 2680 | |
| 2681 | pub fn pointer_motion_absolute<I: InputBackend>( |
| 2682 | &mut self, |
nothing calls this directly
no test coverage detected