cocoadisplay: Don't use position delta for confined mouse mode as it lead to invalid estimation of the pointer position

This commit is contained in:
LD 2022-05-31 21:13:50 +02:00 committed by rdb
parent 69bf5fa626
commit 102da5bc35
1 changed files with 1 additions and 3 deletions

View File

@ -121,9 +121,7 @@
NSPoint loc = [self convertPoint:[event locationInWindow] fromView:nil];
BOOL inside = [self mouse:loc inRect:[self bounds]];
// the correlation between mouse deltas and location are "debounced"
// apparently, so send deltas for both relative and confined modes
if (_graphicsWindow->get_properties().get_mouse_mode() != WindowProperties::M_absolute) {
if (_graphicsWindow->get_properties().get_mouse_mode() == WindowProperties::M_relative) {
_graphicsWindow->handle_mouse_moved_event(inside, [event deltaX], [event deltaY], false);
} else {
_graphicsWindow->handle_mouse_moved_event(inside, loc.x, loc.y, true);