diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-07-18 20:46:36 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-10-11 20:20:21 +0200 |
commit | 6385067924a5d80bd261ddce2d70f003353dccc2 (patch) | |
tree | 995ff96c60372e2f30614774bf7c10181c0c7045 /vcl | |
parent | 4dfba2861424693455818f8ae16537b2d62961eb (diff) |
lok: ensure that dialog windows are focused before emitting events.
Otherwise, we can emit events on a different view's window, causing
problems, and cross-user interference. Also emit the key-event on
the focused sub-window so event bubbling works.
Change-Id: I9dd16c2a256bae58d754f94c6d94a1f3fcdb800b
Reviewed-on: https://gerrit.libreoffice.org/80661
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/window.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 24724e6c8ada..a6b7bfc026f8 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3008,6 +3008,14 @@ void Window::GrabFocusToDocument() ImplGrabFocusToDocument(GetFocusFlags::NONE); } +VclPtr<vcl::Window> Window::GetFocusedWindow() const +{ + if (mpWindowImpl && mpWindowImpl->mpFrameData) + return mpWindowImpl->mpFrameData->mpFocusWin; + else + return VclPtr<vcl::Window>(); +} + void Window::SetFakeFocus( bool bFocus ) { ImplGetWindowImpl()->mbFakeFocusSet = bFocus; |