Skip to content

Commit

Permalink
[osx] Disable periodic dragging updates
Browse files Browse the repository at this point in the history
Only receive dragging events when mouse is moved while dragging is in
progress
  • Loading branch information
martincapello committed Sep 20, 2024
1 parent 608e099 commit b7f5b4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions os/osx/view.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ namespace os {
- (void)createMouseTrackingArea;
- (void)destroyMouseTrackingArea;
- (void)updateCurrentCursor;
- (BOOL)wantsPeriodicDraggingUpdates;
- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender;
- (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender;
- (void)draggingExited:(id<NSDraggingInfo>)sender;
Expand Down
5 changes: 5 additions & 0 deletions os/osx/view.mm
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,11 @@ - (void)updateCurrentCursor
ddProvider);
}

- (BOOL)wantsPeriodicDraggingUpdates
{
return false;
}

- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender
{
WindowOSXObjc* target = (WindowOSXObjc*)sender.draggingDestinationWindow;
Expand Down

0 comments on commit b7f5b4b

Please sign in to comment.