don't use TPM_RECURSE under NT4, it results in TrackPopupMenu() not showing the menu at all (bug 1663216) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -89,6 +89,7 @@ Major new features in 2.8 release
|
|||||||
|
|
||||||
|
|
||||||
2.8.4
|
2.8.4
|
||||||
|
-----
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
@@ -96,6 +97,7 @@ wxMSW:
|
|||||||
it didn't respect font size nor background colour then (Juan Antonio Ortega)
|
it didn't respect font size nor background colour then (Juan Antonio Ortega)
|
||||||
- Don't lose combobox text when it's opened and closed (Kolya Kosenko)
|
- Don't lose combobox text when it's opened and closed (Kolya Kosenko)
|
||||||
- Corrected GetChecked() for events from checkable menu items (smanders)
|
- Corrected GetChecked() for events from checkable menu items (smanders)
|
||||||
|
- Fixed popup menus under Windows NT 4
|
||||||
|
|
||||||
|
|
||||||
2.8.3
|
2.8.3
|
||||||
|
@@ -2104,10 +2104,22 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
::ClientToScreen(hWnd, &point);
|
::ClientToScreen(hWnd, &point);
|
||||||
wxCurrentPopupMenu = menu;
|
wxCurrentPopupMenu = menu;
|
||||||
#if defined(__WXWINCE__)
|
#if defined(__WXWINCE__)
|
||||||
UINT flags = 0;
|
static const UINT flags = 0;
|
||||||
#else
|
#else // !__WXWINCE__
|
||||||
UINT flags = TPM_RIGHTBUTTON | TPM_RECURSE;
|
UINT flags = TPM_RIGHTBUTTON;
|
||||||
#endif
|
// NT4 doesn't support TPM_RECURSE and simply doesn't show the menu at all
|
||||||
|
// when it's use, I'm not sure about Win95/98 but prefer to err on the safe
|
||||||
|
// side and not to use it there neither -- modify the test if it does work
|
||||||
|
// on these systems
|
||||||
|
if ( wxGetWinVersion() >= wxWinVersion_5 )
|
||||||
|
{
|
||||||
|
// using TPM_RECURSE allows us to show a popup menu while another menu
|
||||||
|
// is opened which can be useful and is supported by the other
|
||||||
|
// platforms, so allow it under Windows too
|
||||||
|
flags |= TPM_RECURSE;
|
||||||
|
}
|
||||||
|
#endif // __WXWINCE__/!__WXWINCE__
|
||||||
|
|
||||||
::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);
|
::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);
|
||||||
|
|
||||||
// we need to do it right now as otherwise the events are never going to be
|
// we need to do it right now as otherwise the events are never going to be
|
||||||
|
Reference in New Issue
Block a user