vcl/unx/gtk/window/gtksalframe.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit c6a206010482b22c5d546e10a9ae5ba518ad32a9 Author: Caolán McNamara <caol...@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/17316 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 05bd51b..ba2f79b 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -1927,9 +1927,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 @@ -1946,9 +1944,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); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits