[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-0' - vcl/unx

Caolán McNamara caolanm at redhat.com
Thu Jul 23 07:59:49 PDT 2015


 vcl/unx/gtk/window/gtksalframe.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 6291a9c7a48023ca0f382c2e8782bf781112cc2a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 23 09:55:01 2015 +0100

    Resolves: tdf#92689 grab keyboard focus to parent, not to earlier generations
    
    Change-Id: I4c95f52f0b22ab574f608b93c172e0398e81974b
    (cherry picked from commit 57ec66e294b1405a85029aa1f1c0e9485ad4e5b4)
    Reviewed-on: https://gerrit.libreoffice.org/17317
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 3bee994..f193e98 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1920,9 +1920,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
                 if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 1 )
                 {
                     grabPointer(true, true);
-                    GtkSalFrame *pKeyboardFrame = this;
-                    while (pKeyboardFrame->m_pParent)
-                        pKeyboardFrame = pKeyboardFrame->m_pParent;
+                    GtkSalFrame *pKeyboardFrame = m_pParent ? m_pParent : this;
                     pKeyboardFrame->grabKeyboard(true);
                 }
                 // #i44068# reset parent's IM context
@@ -1939,9 +1937,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
                 m_nFloats--;
                 if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 0)
                 {
-                    GtkSalFrame *pKeyboardFrame = this;
-                    while (pKeyboardFrame->m_pParent)
-                        pKeyboardFrame = pKeyboardFrame->m_pParent;
+                    GtkSalFrame *pKeyboardFrame = m_pParent ? m_pParent : this;
                     pKeyboardFrame->grabKeyboard(false);
                     grabPointer(false);
                 }


More information about the Libreoffice-commits mailing list