summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index cf1454b6f589..4bc0ff223507 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -145,6 +145,15 @@ inline cairo_surface_t * surface_create_similar_surface(GdkSurface *pSurface,
#endif
}
+inline void im_context_set_client_widget(GtkIMContext *pIMContext, GtkWidget *pWidget)
+{
+#if GTK_CHECK_VERSION(4, 0, 0)
+ gtk_im_context_set_client_widget(pIMContext, pWidget);
+#else
+ gtk_im_context_set_client_window(pIMContext, pWidget ? gtk_widget_get_window(pWidget) : nullptr);
+#endif
+}
+
#if GTK_CHECK_VERSION(4, 0, 0)
typedef double gtk_coord;
#else