summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-08-13 21:34:37 +0300
committerEli Zaretskii <eliz@gnu.org>2012-08-13 21:34:37 +0300
commitb7f501c736b4f45b4dee1d4d54a6f710c52f2530 (patch)
tree931a312238eb9ffb6151b30132bb600dea3980e1
parent4432d2e25bc56cd06c9ed0c987d6570b2d57f230 (diff)
downloademacs-b7f501c736b4f45b4dee1d4d54a6f710c52f2530.tar.gz
Backport: Don't disable Unicode menus on Windows NT and later.
src/w32menu.c: Include w32heap.h. (add_menu_item): If the call to AppendMenuW (via unicode_append_menu) fails, disable Unicode menus only if we are running on Windows 9X/Me. src/makefile.w32-in ($(BLD)/w32menu.$(O)): Depend on w32heap.h.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/makefile.w32-in1
-rw-r--r--src/w32menu.c9
3 files changed, 15 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 96c6d244bd1..fbe4f06da58 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2012-08-13 Eli Zaretskii <eliz@gnu.org>
+ * w32menu.c: Include w32heap.h.
+ (add_menu_item): If the call to AppendMenuW (via
+ unicode_append_menu) fails, disable Unicode menus only if we are
+ running on Windows 9X/Me.
+
+ * makefile.w32-in ($(BLD)/w32menu.$(O)): Depend on w32heap.h.
+
* window.c (Fdelete_other_windows_internal)
(Fdelete_window_internal): Don't access frame's mouse highlight
info of the initial frame. (Bug#11677)
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index d7ca325e223..06e633c1443 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -1506,6 +1506,7 @@ $(BLD)/w32menu.$(O) : \
$(SRC)/w32menu.c \
$(SRC)/buffer.h \
$(SRC)/keymap.h \
+ $(SRC)/w32heap.h \
$(BLOCKINPUT_H) \
$(CHARSET_H) \
$(CODING_H) \
diff --git a/src/w32menu.c b/src/w32menu.c
index 9091cb81627..0f45532ed53 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -40,6 +40,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
if this is not done before the other system files. */
#include "w32term.h"
+#include "w32heap.h"
+
/* Load sys/types.h if not already loaded.
In some systems loading it twice is suicidal. */
#ifndef makedev
@@ -1498,8 +1500,11 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
AppendMenu (menu, fuFlags,
item != NULL ? (UINT) item: (UINT) wv->call_data,
out_string);
- /* Don't use Unicode menus in future. */
- unicode_append_menu = NULL;
+ /* Don't use Unicode menus in future, unless this is Windows
+ NT or later, where a failure of AppendMenuW does NOT mean
+ Unicode menus are unsupported. */
+ if (osinfo_cache.dwPlatformId != VER_PLATFORM_WIN32_NT)
+ unicode_append_menu = NULL;
}
if (unicode_append_menu && (fuFlags & MF_OWNERDRAW))