[gtk/gtk-3-24] Fix symbol deprecation warning.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] Fix symbol deprecation warning.
- Date: Sat, 20 Jun 2020 18:17:48 +0000 (UTC)
commit ae97f0449843dfb6c22619873fde1ef06ac6ae8e
Author: John Ralls <jralls ceridwen us>
Date: Wed Apr 15 16:47:00 2020 -0700
Fix symbol deprecation warning.
modules/input/imquartz.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/modules/input/imquartz.c b/modules/input/imquartz.c
index a6ac1a4708..aaf5f42acf 100644
--- a/modules/input/imquartz.c
+++ b/modules/input/imquartz.c
@@ -25,6 +25,8 @@
#include "gtk/gtkintl.h"
#include "gtk/gtkimmodule.h"
+#include <AvailabilityMacros.h>
+
#define GTK_COMPILATION 1 // For gdkquartz-gtk-only.h
#include "gdk/quartz/gdkinternal-quartz.h"
@@ -35,6 +37,12 @@
#define GTK_IM_CONTEXT_QUARTZ(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_IM_CONTEXT_TYPE_QUARTZ,
GtkIMContextQuartz))
#define GTK_IM_CONTEXT_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_IM_CONTEXT_TYPE_QUARTZ,
GtkIMContextQuartzClass))
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 10120
+#define NS_EVENT_KEY_DOWN NSKeyDown
+#else
+#define NS_EVENT_KEY_DOWN NSEventTypeKeyDown
+#endif
+
typedef struct _GtkIMContextQuartz
{
GtkIMContext parent;
@@ -235,7 +243,7 @@ quartz_filter_keypress (GtkIMContext *context,
return FALSE;
NSEventType etype = [nsevent type];
- if (etype == NSKeyDown)
+ if (etype == NS_EVENT_KEY_DOWN)
{
g_object_set_data (G_OBJECT (win), TIC_IN_KEY_DOWN,
GUINT_TO_POINTER (TRUE));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]