diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-24 11:05:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-24 13:41:46 +0200 |
commit | 97b2ad3681ca13d936f7ba04c8da5025b53464c3 (patch) | |
tree | 6e286a7cb40a40d4b31a2450e4b973d80ff04acc /vcl/inc | |
parent | 8719c42ebab0b135b50d559830bfe2c2e0e8debb (diff) |
gtk[3|4] wrap gtk_im_context_set_client_[widget|window] variants
Change-Id: I939786e45929ca81dcda479d0fc897f449f890ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116046
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/unx/gtk/gtkdata.hxx | 9 |
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 |