From 5c4fbedf29a88171ad4ecf600d8e80105675234d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 8 Oct 2015 12:24:05 +0100 Subject: afl-eventtesting: send events to focus window and fallback to toplevel otherwise we get stuck if the menubar gets activated Change-Id: I23a613de41202fa0a542d1da6e10d190225a5f44 --- vcl/source/app/svapp.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 94ebc6e16092..961d4e64c62b 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -347,7 +347,9 @@ namespace { bool InjectKeyEvent(SvStream& rStream) { - VclPtr xWin(Application::GetActiveTopWindow()); + VclPtr xWin(Application::GetFocusWindow()); + if (!xWin) + xWin.reset(Application::GetActiveTopWindow()); if (!xWin) return false; -- cgit