quartz/display: add back scaling factor

With the last patches one thing that got lost if the scaling
factor. This is very visible when i.e loading a svg image
in a Retina display.
parent 3986326b
Pipeline #46752 passed with stage
in 6 minutes and 14 seconds
......@@ -252,7 +252,12 @@ configure_monitor (GdkMonitor *monitor)
monitor->width_mm = width;
monitor->height_mm = height;
monitor->geometry = disp_geometry;
monitor->scale_factor = 1;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (gdk_quartz_osx_version () >= GDK_OSX_MOUNTAIN_LION)
monitor->scale_factor = CGDisplayModeGetPixelWidth (mode) / CGDisplayModeGetWidth (mode);
else
#endif
monitor->scale_factor = 1;
monitor->refresh_rate = refresh_rate;
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN;
CGDisplayModeRelease (mode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment