reenabled WS_EX_CONTROLPARENT style together with a check that the focus window is not disabled or hidden
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1165,15 +1165,11 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// to make the dialog navigation work with the nested panels we must
|
// to make the dialog navigation work with the nested panels we must
|
||||||
// use this style but, unfortunately, it hangs NT4 in some situations
|
// use this style
|
||||||
// so we shouldn't use it -- even though it means that keyboard accels
|
|
||||||
// in, e.g. wxWizard, don't work
|
|
||||||
#if 0
|
|
||||||
if ( flags & wxTAB_TRAVERSAL )
|
if ( flags & wxTAB_TRAVERSAL )
|
||||||
{
|
{
|
||||||
*exstyle |= WS_EX_CONTROLPARENT;
|
*exstyle |= WS_EX_CONTROLPARENT;
|
||||||
}
|
}
|
||||||
#endif // 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return style;
|
return style;
|
||||||
@@ -2083,6 +2079,13 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
|
|||||||
// needed by the control itself: in particular, it prevents the tree in
|
// needed by the control itself: in particular, it prevents the tree in
|
||||||
// place edit control from being closed with Escape in a dialog
|
// place edit control from being closed with Escape in a dialog
|
||||||
if ( msg->message != WM_KEYDOWN || msg->wParam != VK_ESCAPE )
|
if ( msg->message != WM_KEYDOWN || msg->wParam != VK_ESCAPE )
|
||||||
|
{
|
||||||
|
// ::IsDialogMessage() can enter in an infinite loop when
|
||||||
|
// WS_EX_CONTROLPARENT is specified and the currently focused
|
||||||
|
// window is disabled or hidden, so don't call it in this case
|
||||||
|
HWND hwndFocus = ::GetFocus();
|
||||||
|
if ( !hwndFocus ||
|
||||||
|
::IsWindowEnabled(hwndFocus) && ::IsWindowVisible(hwndFocus) )
|
||||||
{
|
{
|
||||||
if ( ::IsDialogMessage(GetHwnd(), msg) )
|
if ( ::IsDialogMessage(GetHwnd(), msg) )
|
||||||
{
|
{
|
||||||
@@ -2091,6 +2094,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // __WXUNIVERSAL__
|
#endif // __WXUNIVERSAL__
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
|
Reference in New Issue
Block a user