Ensure that the WM_ENTERIDLE message is not sent if the wake-up event
for the MSG_InternalGetMessage() call is a WM_TIMER.

diff --git a/controls/menu.c b/controls/menu.c
index 9092a4f..4b2beb8 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -2589,6 +2589,7 @@
     BOOL fRemove;
     INT executedMenuId = 0;
     MTRACKER mt;
+    BOOL enterIdleSent = FALSE;
 
     mt.trackFlags = 0;
     mt.hCurrentMenu = hmenu;
@@ -2617,11 +2618,14 @@
 	 * clear that menu loop is not over yet. */
 
 	if (!MSG_InternalGetMessage( &msg, msg.hwnd, mt.hOwnerWnd,
-				     MSGF_MENU, PM_NOREMOVE, TRUE )) break;
+				     MSGF_MENU, PM_NOREMOVE, !enterIdleSent, &enterIdleSent )) break;
 
         TranslateMessage( &msg );
         mt.pt = msg.pt;
 
+	if ( (msg.hwnd==menu->hWnd) || (msg.message!=WM_TIMER) )
+	  enterIdleSent=FALSE;
+
         fRemove = FALSE;
 	if ((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST))
 	{