[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32fns.c,v
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32fns.c,v |
Date: |
Thu, 22 Feb 2007 22:50:04 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 07/02/22 22:50:04
Index: w32fns.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32fns.c,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -b -r1.284 -r1.285
--- w32fns.c 21 Jan 2007 04:18:15 -0000 1.284
+++ w32fns.c 22 Feb 2007 22:50:04 -0000 1.285
@@ -297,6 +297,9 @@
static HWND w32_visible_system_caret_hwnd;
+/* From w32menu.c */
+extern HMENU current_popup_menu;
+
/* Error if we are not connected to MS-Windows. */
void
@@ -3411,7 +3414,9 @@
KillTimer (hwnd, menu_free_timer);
menu_free_timer = 0;
f = x_window_to_frame (dpyinfo, hwnd);
- if (!f->output_data.w32->menu_command_in_progress)
+ /* If a popup menu is active, don't wipe its strings. */
+ if (f->output_data.w32->menubar_active
+ && current_popup_menu == NULL)
{
/* Free memory used by owner-drawn and help-echo strings. */
w32_free_menu_strings (hwnd);
@@ -3473,10 +3478,13 @@
case WM_EXITMENULOOP:
f = x_window_to_frame (dpyinfo, hwnd);
- /* If a menu command is not already in progress, check again
- after a short delay, since Windows often (always?) sends the
- WM_EXITMENULOOP before the corresponding WM_COMMAND message. */
- if (f && !f->output_data.w32->menu_command_in_progress)
+ /* If a menu is still active, check again after a short delay,
+ since Windows often (always?) sends the WM_EXITMENULOOP
+ before the corresponding WM_COMMAND message.
+ Don't do this if a popup menu is active, since it is only
+ menubar menus that require cleaning up in this way.
+ */
+ if (f && f->output_data.w32->menubar_active && current_popup_menu ==
NULL)
menu_free_timer = SetTimer (hwnd, MENU_FREE_ID, MENU_FREE_DELAY, NULL);
goto dflt;
@@ -3634,7 +3642,6 @@
f = x_window_to_frame (dpyinfo, hwnd);
if (f && HIWORD (wParam) == 0)
{
- f->output_data.w32->menu_command_in_progress = 1;
if (menu_free_timer)
{
KillTimer (hwnd, menu_free_timer);
- [Emacs-diffs] Changes to emacs/src/w32fns.c,v,
Jason Rumney <=