summaryrefslogtreecommitdiff
path: root/vcl/source/window/window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r--vcl/source/window/window.cxx25
1 files changed, 15 insertions, 10 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 64e535ad6ff9..a79fecf9911e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4167,6 +4167,20 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags )
}
}
+void Window::ImplGrabFocusToDocument( sal_uInt16 nFlags )
+{
+ Window *pWin = this;
+ while( pWin )
+ {
+ if( !pWin->GetParent() )
+ {
+ pWin->ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->ImplGrabFocus(nFlags);
+ return;
+ }
+ pWin = pWin->GetParent();
+ }
+}
+
// -----------------------------------------------------------------------
void Window::ImplNewInputContext()
@@ -7506,16 +7520,7 @@ sal_Bool Window::HasFocus() const
void Window::GrabFocusToDocument()
{
- Window *pWin = this;
- while( pWin )
- {
- if( !pWin->GetParent() )
- {
- pWin->ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus();
- return;
- }
- pWin = pWin->GetParent();
- }
+ ImplGrabFocusToDocument(0);
}
void Window::SetFakeFocus( bool bFocus )