[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 10 18:59:04 UTC 2021
vcl/unx/gtk3/gtkframe.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 40b7d4b26fa6696db11e6f65b4d340f317f03b9a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 10 17:00:53 2021 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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
More information about the Libreoffice-commits
mailing list