From b7f5b4ba321ff9746391374b6e24d8420dae108c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Fri, 20 Sep 2024 15:17:03 -0300 Subject: [PATCH] [osx] Disable periodic dragging updates Only receive dragging events when mouse is moved while dragging is in progress --- os/osx/view.h | 1 + os/osx/view.mm | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/os/osx/view.h b/os/osx/view.h index 1ba0cba09..2aab6735b 100644 --- a/os/osx/view.h +++ b/os/osx/view.h @@ -65,6 +65,7 @@ namespace os { - (void)createMouseTrackingArea; - (void)destroyMouseTrackingArea; - (void)updateCurrentCursor; +- (BOOL)wantsPeriodicDraggingUpdates; - (NSDragOperation)draggingEntered:(id)sender; - (NSDragOperation)draggingUpdated:(id)sender; - (void)draggingExited:(id)sender; diff --git a/os/osx/view.mm b/os/osx/view.mm index b1fb95833..5c2042f1b 100644 --- a/os/osx/view.mm +++ b/os/osx/view.mm @@ -668,6 +668,11 @@ - (void)updateCurrentCursor ddProvider); } +- (BOOL)wantsPeriodicDraggingUpdates +{ + return false; +} + - (NSDragOperation)draggingEntered:(id)sender { WindowOSXObjc* target = (WindowOSXObjc*)sender.draggingDestinationWindow;