diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-23 09:55:01 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2015-07-23 10:49:39 +0000 |
commit | c6a206010482b22c5d546e10a9ae5ba518ad32a9 (patch) | |
tree | cdd6310f14d94d8e61eb3ac5bc4498df7b053241 | |
parent | b602cf586adad53b123a776838722a8abd2fe18d (diff) |
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 <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 05bd51b19278..ba2f79bd6ea2 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); } |