mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-20 01:40:18 -05:00
feat: add wheel scroll factor
This commit is contained in:
parent
5f884bdf51
commit
a8f7dc3e68
3 changed files with 13 additions and 4 deletions
|
|
@ -1711,10 +1711,11 @@ axisnotify(struct wl_listener *listener, void *data) {
|
|||
* implemented checking the event's orientation and the delta of the event
|
||||
*/
|
||||
/* Notify the client with pointer focus of the axis event. */
|
||||
wlr_seat_pointer_notify_axis(seat, // 滚轮事件发送给客户端也就是窗口
|
||||
event->time_msec, event->orientation,
|
||||
event->delta, event->delta_discrete,
|
||||
event->source, event->relative_direction);
|
||||
wlr_seat_pointer_notify_axis(
|
||||
seat, // 滚轮事件发送给客户端也就是窗口
|
||||
event->time_msec, event->orientation, event->delta * axis_scroll_factor,
|
||||
roundf(event->delta_discrete * axis_scroll_factor), event->source,
|
||||
event->relative_direction);
|
||||
}
|
||||
|
||||
int ongesture(struct wlr_pointer_swipe_end_event *event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue