Update API for El Capitan+
authorCody Russell <bratsche@gnome.org>
Tue, 18 Jul 2017 18:54:11 +0000 (14:54 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 18 Jul 2017 18:54:11 +0000 (14:54 -0400)
Use NSAnimationContext where possible.

gdk/quartz/gdkwindow-quartz.c

index 6878e52d7b2f40c243c8acb9c46407d95299884c..4ffbae047d70ad21d6dd842c130d1544976f9545 100644 (file)
@@ -423,7 +423,14 @@ _gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
 {
   in_process_all_updates = TRUE;
 
-  NSDisableScreenUpdates ();
+  if (gdk_quartz_osx_version () >= GDK_OSX_EL_CAPITAN)
+    {
+      [NSAnimationContext endGrouping];
+    }
+  else
+    {
+      NSDisableScreenUpdates ();
+    }
 }
 
 void
@@ -453,7 +460,14 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
 
   in_process_all_updates = FALSE;
 
-  NSEnableScreenUpdates ();
+  if (gdk_quartz_osx_version() >= GDK_OSX_EL_CAPITAN)
+    {
+      [NSAnimationContext beginGrouping];
+    }
+  else
+    {
+      NSEnableScreenUpdates ();
+    }
 }
 
 static const gchar *