diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-17 16:24:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-17 18:07:13 +0200 |
commit | 27756f26b17ae5c0f7bcd560c5ede84776c1c5e4 (patch) | |
tree | f9fe78eee678563edbf5b2e5f6a21dc97b6c87b1 | |
parent | f71debf3fa65493ebb1a1538023987d76c66374c (diff) |
Resolves: tdf#134939 don't update IM position if focus is in another widget
Change-Id: Ia078ed9c1896d4a3541525ea2907760ce235dfd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104466
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index e7e3f96eccfe..d14574489956 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3188,10 +3188,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) { if (!gtk_widget_get_realized(pFocusWindow)) return true; @@ -3306,7 +3309,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; |