[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 22 09:20:14 UTC 2020
vcl/unx/gtk3/gtk3gtkframe.cxx | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit a47ab61f6f2a7959d4e14759648e766c2629497d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 21 12:48:53 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 22 11:19:30 2020 +0200
don't update IM focus-in if focus-in was in another widget
Change-Id: Ifdb2bc6ac973a067ac3e27207f6d1cacfdf2c31d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104634
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index fd18c35aec6d..26c34a09c9d4 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3105,7 +3105,16 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
pThis->m_nKeyModifiers = ModKeyFlags::NONE;
if( pThis->m_pIMHandler )
- pThis->m_pIMHandler->focusChanged( pEvent->in != 0 );
+ {
+ bool bFocusInAnotherGtkWidget = false;
+ if (GTK_IS_WINDOW(pThis->m_pWindow))
+ {
+ GtkWidget* pFocusWindow = gtk_window_get_focus(GTK_WINDOW(pThis->m_pWindow));
+ bFocusInAnotherGtkWidget = pFocusWindow && pFocusWindow != GTK_WIDGET(pThis->m_pFixedContainer);
+ }
+ if (!bFocusInAnotherGtkWidget)
+ pThis->m_pIMHandler->focusChanged( pEvent->in != 0 );
+ }
// ask for changed printers like generic implementation
if( pEvent->in && pSalInstance->isPrinterInit() )
@@ -3115,7 +3124,6 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
// while we have the pointer grabbed, this should not come from
// the window manager. Is this an event that was still queued ?
// The focus does not seem to get set inside our process
-
// in the meantime do not propagate focus get/lose if floats are open
if( m_nFloats == 0 )
{
More information about the Libreoffice-commits
mailing list