diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-10 17:00:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-10 20:58:13 +0200 |
commit | 40b7d4b26fa6696db11e6f65b4d340f317f03b9a (patch) | |
tree | 028eb9f96f2a98d9a71cc503749c53ec70dfe240 | |
parent | 4e5f2861154e6bccb7a77356c76c5327d8bda6c4 (diff) |
gtk4: gtk_im_context_set_client_window->gtk_im_context_set_client_widget
Change-Id: I21d3cd5daf77264f08c6864425c6d9ff37404325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115349
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtkframe.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index fd72d3801998..9933e4689dec 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -4448,7 +4448,9 @@ void GtkSalFrame::IMHandler::createIMContext() G_CALLBACK (signalIMPreeditEnd), this ); GetGenericUnixSalData()->ErrorTrapPush(); -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) + gtk_im_context_set_client_widget(m_pIMContext, m_pFrame->getMouseEventWidget()); +#else gtk_im_context_set_client_window(m_pIMContext, gtk_widget_get_window(m_pFrame->getMouseEventWidget())); #endif gtk_im_context_focus_in( m_pIMContext ); @@ -4463,8 +4465,10 @@ void GtkSalFrame::IMHandler::deleteIMContext() { // first give IC a chance to deinitialize GetGenericUnixSalData()->ErrorTrapPush(); -#if !GTK_CHECK_VERSION(4, 0, 0) - gtk_im_context_set_client_window( m_pIMContext, nullptr ); +#if GTK_CHECK_VERSION(4, 0, 0) + gtk_im_context_set_client_widget(m_pIMContext, nullptr); +#else + gtk_im_context_set_client_window(m_pIMContext, nullptr); #endif GetGenericUnixSalData()->ErrorTrapPop(); // destroy old IC |