macos: fix scale on macOS 12 beta
authorChristian Hergert <chergert@redhat.com>
Thu, 14 Oct 2021 21:46:30 +0000 (14:46 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:05 +0000 (17:52 -0400)
commit63583c15db94825529f6232feca7bd4671c45db2
tree3f625deac2fda4462ea7dd95174977121237e2e4
parent0028267228dbaa5be76415e6847ada6db81d1792
macos: fix scale on macOS 12 beta

This is a port of the fix in the quartz backend to the new macOS backend.

From the original commit:

In macOS-12.sdk CGContextConverSizeToDeviceSpace returns a negative
height and passing that to CGContextScaleCTM in turn causes the cairo
surface to draw outside the window where it can't be seen. Passing the
absolute values of the scale factors fixes the display on macOS 12 without
affecting earlier macOS versions.
gdk/macos/gdkmacossurface.c