[gtk/gtk-3-24: 2/10] quartz: Clean up two macOS deprecation warnings.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 2/10] quartz: Clean up two macOS deprecation warnings.
- Date: Sat, 21 May 2022 13:15:22 +0000 (UTC)
commit b72e4437a20609acf03e720e7a8c461512bff285
Author: John Ralls <jralls ceridwen us>
Date: Tue Feb 1 12:06:23 2022 -0800
quartz: Clean up two macOS deprecation warnings.
gdk/quartz/gdkwindow-quartz.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 5f5f67eb9c..c851a84ace 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -160,27 +160,27 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
* and for widgets that send fake expose events like the arrow
* buttons in spinbuttons or the position marker in rulers.
*/
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
if (window_impl->in_paint_rect_count == 0)
{
/* The NSView focus-locking API set was deprecated in MacOS 10.14 and
- * has a significant cost in MacOS 11 - every lock/unlock seems to
+ * has a significant cost in MacOS 11 - every lock/unlock seems to
* trigger a drawRect: call for the entire window. To return the
* lost performance, do not use the locking API in MacOS 11+
*/
- if(gdk_quartz_osx_version() < GDK_OSX_BIGSUR)
+ if(gdk_quartz_osx_version() < GDK_OSX_MOJAVE)
{
if (![window_impl->view lockFocusIfCanDraw])
return NULL;
}
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000
- cg_context = [[NSGraphicsContext currentContext] graphicsPort];
-#else
+#endif
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
else
- cg_context = [[NSGraphicsContext currentContext] CGContext];
#endif
+ cg_context = [[NSGraphicsContext currentContext] CGContext];
if (!cg_context)
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]