13
0

Remove call to deprecated userSpaceScaleFactor

userSpaceScaleFactor is a missing symbol on some recent versions of macOS.
This commit is contained in:
Robin Gareus 2024-04-09 06:06:58 +02:00
parent 826103f08c
commit ecd22e9aa8

View File

@ -88,8 +88,7 @@ _gdk_screen_quartz_init (GdkScreenQuartz *screen_quartz)
gdk_screen_get_system_colormap (screen));
nsscreen = [[NSScreen screens] objectAtIndex:0];
gdk_screen_set_resolution (screen,
72.0 * [nsscreen userSpaceScaleFactor]);
gdk_screen_set_resolution (screen, 72.0 /* * [nsscreen userSpaceScaleFactor] */);
gdk_screen_quartz_calculate_layout (screen_quartz);
@ -362,7 +361,7 @@ get_mm_from_pixels (NSScreen *screen, int pixels)
* and 25.4 is the number of millimeters per inch.
*/
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_3
float dpi = [screen userSpaceScaleFactor] * 72.0;
float dpi = /* [screen userSpaceScaleFactor] * */ 72.0;
#else
float dpi = 96.0 / 72.0;
#endif