diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-08 12:24:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-08 13:40:24 +0100 |
commit | 5c4fbedf29a88171ad4ecf600d8e80105675234d (patch) | |
tree | 6f0e18c8da7b34957d2e7e55426bf8bc38f55d8d | |
parent | 0d79e4c07a7a7328cc0bed1d7998317b634543d8 (diff) |
afl-eventtesting: send events to focus window and fallback to toplevel
otherwise we get stuck if the menubar gets activated
Change-Id: I23a613de41202fa0a542d1da6e10d190225a5f44
-rw-r--r-- | vcl/source/app/svapp.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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<vcl::Window> xWin(Application::GetActiveTopWindow()); + VclPtr<vcl::Window> xWin(Application::GetFocusWindow()); + if (!xWin) + xWin.reset(Application::GetActiveTopWindow()); if (!xWin) return false; |