mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
ui/app: (macOS) use a consistent and constant backing store constant
Compute and keep constant the pixel density, to avoid window content changes when moving to another monitor with a different density. Use backing store scale, not content scale for input events. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
static void handleMouse(NSView *view, NSEvent *event, int typ, CGFloat dx, CGFloat dy) {
|
||||
NSPoint p = [view convertPoint:[event locationInWindow] fromView:nil];
|
||||
CGFloat scale = view.layer.contentsScale;
|
||||
CGFloat scale = view.window.backingScaleFactor;
|
||||
if (!event.hasPreciseScrollingDeltas) {
|
||||
// dx and dy are in rows and columns.
|
||||
dx *= 10;
|
||||
|
||||
Reference in New Issue
Block a user