reverted wxPopupWindow implementation to the original version using WS_CHILD and desktop as parent; this fixes the activation problem but reopens the other ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -740,44 +740,3 @@ bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowMSW message processing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
long wxTopLevelWindowMSW::HandleNcActivate(bool activate)
|
||||
{
|
||||
#if wxUSE_POPUPWIN
|
||||
/*
|
||||
Normally, when another top level (whether it is overlapped or popup)
|
||||
window is shown, it is activated and the parent window (i.e. we) loses
|
||||
the activation. This, however, looks very ugly when the child window is
|
||||
a [custom] combobox which we implement using a popup window as surely
|
||||
opening a combobox shouldn't result in deactivating the parent window.
|
||||
|
||||
So we don't redraw the title bar in this case, even if we still return
|
||||
TRUE to let the change of activation to take place as otherwise the
|
||||
controls inside the popup window wouldn't work properly.
|
||||
*/
|
||||
if ( !activate && wxPopupWindow::FindPopupFor(this) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
#endif // wxUSE_POPUPWIN
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
long
|
||||
wxTopLevelWindowMSW::MSWWindowProc(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
if ( msg == WM_NCACTIVATE )
|
||||
{
|
||||
if ( HandleNcActivate(wParam != 0) )
|
||||
{
|
||||
// we processed WM_NCACTIVATE ourselves
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return wxTopLevelWindowBase::MSWWindowProc(msg, wParam, lParam);
|
||||
}
|
||||
|
Reference in New Issue
Block a user