Skip to content

Commit

Permalink
wayland_backend: Don't spam mousewheel on pointer frames with no delta
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed May 19, 2024
1 parent 4ca3986 commit d54afb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wayland_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,9 @@ namespace gamescope
if ( m_uAxisSource != WL_POINTER_AXIS_SOURCE_WHEEL )
return;

if ( x == 0.0 && y == 0.0 )
return;

wlserver_lock();
wlserver_mousewheel( x, y, ++m_uFakeTimestamp );
wlserver_unlock();
Expand Down

0 comments on commit d54afb7

Please sign in to comment.