[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 19 09:22:07 UTC 2020
vcl/unx/gtk3/gtk3gtkframe.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit d76e9fc4edcdf9a44cb2ed9542261064a8a76dde
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 17 16:24:09 2020 +0100
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Oct 19 11:21:34 2020 +0200
Resolves: tdf#137201 and tdf#134939 don't update IM if focus is in another widget
Change-Id: Ia078ed9c1896d4a3541525ea2907760ce235dfd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104346
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index d818ec137096..69a554108196 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3190,10 +3190,13 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
+ bool bFocusInAnotherGtkWidget = false;
+
if (GTK_IS_WINDOW(pThis->m_pWindow))
{
GtkWidget* pFocusWindow = gtk_window_get_focus(GTK_WINDOW(pThis->m_pWindow));
- if (pFocusWindow && pFocusWindow != GTK_WIDGET(pThis->m_pFixedContainer))
+ bFocusInAnotherGtkWidget = pFocusWindow && pFocusWindow != GTK_WIDGET(pThis->m_pFixedContainer);
+ if (bFocusInAnotherGtkWidget)
{
gpointer pClass = g_type_class_ref(GTK_TYPE_WINDOW);
GtkWidgetClass* pWindowClass = GTK_WIDGET_CLASS(pClass);
@@ -3213,11 +3216,8 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe
vcl::DeletionListener aDel( pThis );
- if( pThis->m_pIMHandler )
- {
- if( pThis->m_pIMHandler->handleKeyEvent( pEvent ) )
- return true;
- }
+ if (!bFocusInAnotherGtkWidget && pThis->m_pIMHandler && pThis->m_pIMHandler->handleKeyEvent(pEvent))
+ return true;
bool bStopProcessingKey = false;
@@ -3306,7 +3306,7 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe
pThis->m_nKeyModifiers = ModKeyFlags::NONE;
}
- if( !aDel.isDeleted() && pThis->m_pIMHandler )
+ if (!bFocusInAnotherGtkWidget && !aDel.isDeleted() && pThis->m_pIMHandler)
pThis->m_pIMHandler->updateIMSpotLocation();
return bStopProcessingKey;
More information about the Libreoffice-commits
mailing list