@@ -193,7 +193,10 @@ static void
193193pointer_handle_axis (void * data UNUSED , struct wl_pointer * pointer UNUSED , uint32_t time , uint32_t axis , wl_fixed_t value ) {
194194 _GLFWwindow * window = _glfw .wl .pointerFocus ;
195195 if (!window ) return ;
196- if (!info .timestamp_ns ) info .timestamp_ns = ms_to_monotonic_t (time );
196+ switch (axis ) {
197+ case WL_POINTER_AXIS_VERTICAL_SCROLL : if (!info .y_start_time ) info .y_start_time = ms_to_monotonic_t (time ); break ;
198+ case WL_POINTER_AXIS_HORIZONTAL_SCROLL : if (!info .x_start_time ) info .x_start_time = ms_to_monotonic_t (time ); break ;
199+ }
197200 pointer_handle_axis_common (AXIS_EVENT_CONTINUOUS , axis , value );
198201}
199202
@@ -230,10 +233,27 @@ pointer_handle_frame(void *data UNUSED, struct wl_pointer *pointer UNUSED) {
230233}
231234
232235static void
233- pointer_handle_axis_source (void * data UNUSED , struct wl_pointer * pointer UNUSED , uint32_t source UNUSED ) { }
236+ pointer_handle_axis_source (void * data UNUSED , struct wl_pointer * pointer UNUSED , uint32_t source ) {
237+ _GLFWwindow * window = _glfw .wl .pointerFocus ;
238+ if (!window ) return ;
239+ info .source_type = source ;
240+ }
234241
235242static void
236- pointer_handle_axis_stop (void * data UNUSED , struct wl_pointer * wl_pointer UNUSED , uint32_t time UNUSED , uint32_t axis UNUSED ) { }
243+ pointer_handle_axis_stop (void * data UNUSED , struct wl_pointer * wl_pointer UNUSED , uint32_t time UNUSED , uint32_t axis ) {
244+ _GLFWwindow * window = _glfw .wl .pointerFocus ;
245+ if (!window ) return ;
246+ switch (axis ) {
247+ case WL_POINTER_AXIS_VERTICAL_SCROLL :
248+ info .y_stop_received = true;
249+ info .y_stop_time = ms_to_monotonic_t (time );
250+ break ;
251+ case WL_POINTER_AXIS_HORIZONTAL_SCROLL :
252+ info .x_stop_received = true;
253+ info .x_stop_time = ms_to_monotonic_t (time );
254+ break ;
255+ }
256+ }
237257
238258
239259static void
0 commit comments