mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
macOS: Fix touch scrolling sensitivity low on retina screens
Fixes #1112
This commit is contained in:
@@ -902,6 +902,11 @@ is_ascii_control_char(char x) {
|
||||
deltaX = [event scrollingDeltaX];
|
||||
deltaY = [event scrollingDeltaY];
|
||||
int flags = [event hasPreciseScrollingDeltas] ? 1 : 0;
|
||||
if (flags) {
|
||||
float xscale = 1, yscale = 1;
|
||||
_glfwPlatformGetWindowContentScale(window, &xscale, &yscale);
|
||||
if (yscale > 0) deltaY *= yscale;
|
||||
}
|
||||
|
||||
if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0)
|
||||
_glfwInputScroll(window, deltaX, deltaY, flags);
|
||||
|
||||
Reference in New Issue
Block a user