vcl/unx/gtk3/gtkframe.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit 40b7d4b26fa6696db11e6f65b4d340f317f03b9a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 10 17:00:53 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon May 10 20:58:13 2021 +0200 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 <caol...@redhat.com> 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits