Skip to content

Commit

Permalink
#2160 macOS event garbage
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Mar 13, 2024
1 parent e208ca4 commit 5257b68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Fix mouse_action resize throttling issue caused by friggin Apple event timestep garbage [#2160](https://github.com/koekeishiya/yabai/issues/2160)

## [7.0.0] - 2024-03-13
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ static EVENT_HANDLER(MOUSE_DRAGGED)
} else if (g_mouse_state.current_action == MOUSE_MODE_RESIZE) {
uint64_t event_time = CGEventGetTimestamp(context);
float dt = ((float) event_time - g_mouse_state.last_moved_time) * (1.0f / 1E6);
if (dt < 66.67f) goto out;
if (dt < 2.0f) goto out;

int dx = point.x - g_mouse_state.down_location.x;
int dy = point.y - g_mouse_state.down_location.y;
Expand Down

0 comments on commit 5257b68

Please sign in to comment.