Fix regression with MDI children accelerators

Since the changes of 8034e35391 (see #16870)
accelerators, including the standard ones such as Ctrl-F4 under MSW, didn't
work any longer inside the MDI children.

Fix this by extending IsTopNavigationDomain() to allow for checking whether
the given window should stop propagation of all keyboard events, as wxTLW
does, or only TAB navigation ones as wxMDIChildFrame and wxAuiFloatingFrame
do.
This commit is contained in:
Vadim Zeitlin
2016-02-28 01:24:20 +01:00
parent fd738c5fdb
commit 5e61689dbf
10 changed files with 68 additions and 14 deletions

View File

@@ -182,7 +182,21 @@ public:
// In all ports keyboard navigation must stop at MDI child frame level and
// can't cross its boundary. Indicate this by overriding this function to
// return true.
virtual bool IsTopNavigationDomain() const wxOVERRIDE { return true; }
virtual bool IsTopNavigationDomain(NavigationKind kind) const wxOVERRIDE
{
switch ( kind )
{
case Navigation_Tab:
return true;
case Navigation_Accel:
// Parent frame accelerators should work inside MDI child, so
// don't block their processing by returning true for them.
break;
}
return false;
}
// Raising any frame is supposed to show it but wxFrame Raise()
// implementation doesn't work for MDI child frames in most forms so