mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-07 11:20:09 +00:00
Merge Ignacio Casal Quintero's quartz-scale-factor' into gtk-3-24.
This commit is contained in:
commit
1c1a86d0fc
@ -252,7 +252,12 @@ configure_monitor (GdkMonitor *monitor)
|
|||||||
monitor->width_mm = width;
|
monitor->width_mm = width;
|
||||||
monitor->height_mm = height;
|
monitor->height_mm = height;
|
||||||
monitor->geometry = disp_geometry;
|
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->refresh_rate = refresh_rate;
|
||||||
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN;
|
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN;
|
||||||
CGDisplayModeRelease (mode);
|
CGDisplayModeRelease (mode);
|
||||||
|
Loading…
Reference in New Issue
Block a user