[gtk/fix-imcontext-crash] imcontextsimple: Fix a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-imcontext-crash] imcontextsimple: Fix a crash
- Date: Tue, 9 Feb 2021 23:00:30 +0000 (UTC)
commit 6f9e8ce165b70f2620a6f2a2767e0a467484272e
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 9 17:58:58 2021 -0500
imcontextsimple: Fix a crash
In the backport, I inadvertendly removed the
set_client_window implementation, which needs
to remain.
gtk/gtkimcontextsimple.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
---
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index e73f39215e..f6dbe98cbd 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -19,6 +19,16 @@
#include <gdk/gdk.h>
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+#include <wayland/gdkwayland.h>
+#endif
+#ifdef GDK_WINDOWING_WIN32
+#include <win32/gdkwin32.h>
+#endif
+
#include <stdlib.h>
#include <string.h>
@@ -110,6 +120,9 @@ static void gtk_im_context_simple_get_preedit_string (GtkIMContext
char **str,
PangoAttrList **attrs,
int *cursor_pos);
+static void gtk_im_context_simple_set_client_window (GtkIMContext *context,
+ GdkWindow *window);
+
static void init_compose_table_async (GCancellable *cancellable,
GAsyncReadyCallback callback,
@@ -126,6 +139,7 @@ gtk_im_context_simple_class_init (GtkIMContextSimpleClass *class)
im_context_class->filter_keypress = gtk_im_context_simple_filter_keypress;
im_context_class->reset = gtk_im_context_simple_reset;
im_context_class->get_preedit_string = gtk_im_context_simple_get_preedit_string;
+ im_context_class->set_client_window = gtk_im_context_simple_set_client_window;
gobject_class->finalize = gtk_im_context_simple_finalize;
init_compose_table_async (NULL, NULL, NULL);
@@ -927,6 +941,12 @@ gtk_im_context_simple_get_preedit_string (GtkIMContext *context,
*str = g_string_free (s, FALSE);
}
+static void
+gtk_im_context_simple_set_client_window (GtkIMContext *context,
+ GdkWindow *window)
+{
+}
+
/**
* gtk_im_context_simple_add_table: (skip)
* @context_simple: A #GtkIMContextSimple
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]