aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog17
-rw-r--r--src/makefile.w32-in3
-rw-r--r--src/w32fns.c12
3 files changed, 26 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4694c984f2d..a707d884454 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -36,6 +36,13 @@
36 36
37 * term.c: Include unistd.h only if HAVE_UNISTD_H. 37 * term.c: Include unistd.h only if HAVE_UNISTD_H.
38 38
392007-07-11 Jason Rumney <jasonr@gnu.org>
40
41 * makefile.w32-in (LIBS): Include OLE32.
42
43 * w32fns.c (w32_msg_pump) <WM_EMACS_CREATEWINDOW>: Initialize COM.
44 (w32_msg_pump) <WM_DESTROY>: Uninitialize COM.
45
392007-07-11 Stefan Monnier <monnier@iro.umontreal.ca> 462007-07-11 Stefan Monnier <monnier@iro.umontreal.ca>
40 47
41 * lisp.h (struct Lisp_Hash_Table): Turn next_weak into a bare pointer. 48 * lisp.h (struct Lisp_Hash_Table): Turn next_weak into a bare pointer.
@@ -1206,13 +1213,13 @@
1206 when popup menu finishes. 1213 when popup menu finishes.
1207 1214
1208 * w32fns.c (menubar_in_use): New flag. 1215 * w32fns.c (menubar_in_use): New flag.
1209 (w32_wnd_proc) [WM_INITMENU, WM_EXITMENULOOP, WM_TIMER, WM_COMMAND]: 1216 (w32_wnd_proc) <WM_INITMENU, WM_EXITMENULOOP, WM_TIMER, WM_COMMAND>:
1210 Use it. 1217 Use it.
1211 1218
1212 * w32menu.c (Fx_popup_menu): Don't free menu strings here. 1219 * w32menu.c (Fx_popup_menu): Don't free menu strings here.
1213 (w32_menu_show): Do it here instead. 1220 (w32_menu_show): Do it here instead.
1214 1221
1215 * w32fns.c (w32_wnd_proc) [WM_INITMENU]: Set menubar_active frame 1222 * w32fns.c (w32_wnd_proc) <WM_INITMENU>: Set menubar_active frame
1216 parameter. 1223 parameter.
1217 1224
1218 * w32menu.c (current_popup_menu): Make available globally. 1225 * w32menu.c (current_popup_menu): Make available globally.
@@ -1220,7 +1227,7 @@
1220 menu event into the keyboard buffer. Remove menu_command_in_progress. 1227 menu event into the keyboard buffer. Remove menu_command_in_progress.
1221 1228
1222 * w32fns.c (current_popup_menu): Use from w32menu.c. 1229 * w32fns.c (current_popup_menu): Use from w32menu.c.
1223 (w32_wnd_proc) [WM_EXITMENULOOP, WM_TIMER]: Use menubar_active 1230 (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active
1224 and current_popup_menu to determine whether a menubar menu has 1231 and current_popup_menu to determine whether a menubar menu has
1225 been cancelled. 1232 been cancelled.
1226 1233
@@ -10331,7 +10338,7 @@
10331 * w32term.h (x_output): Add focus_state. 10338 * w32term.h (x_output): Add focus_state.
10332 10339
10333 * w32term.c (x_focus_changed, w32_detect_focus_change): New functions. 10340 * w32term.c (x_focus_changed, w32_detect_focus_change): New functions.
10334 (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change. 10341 (w32_read_socket) <WM_SETFOCUS>: Call w32_detect_focus_change.
10335 10342
103362005-03-25 Stefan Monnier <monnier@iro.umontreal.ca> 103432005-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
10337 10344
@@ -13624,7 +13631,7 @@
13624 13631
13625 * w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c. 13632 * w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c.
13626 13633
13627 * w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: 13634 * w32fns.c (w32_wnd_proc) <WM_MEASUREITEM, WM_DRAWITEM>:
13628 Handle Unicode menu titles. 13635 Handle Unicode menu titles.
13629 13636
136302004-09-07 Kim F. Storm <storm@cua.dk> 136372004-09-07 Kim F. Storm <storm@cua.dk>
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 4dad03f4c0c..ccb0dcf9f5f 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -138,7 +138,7 @@ LIBS = $(TLIB0) \
138 $(TLIB1) \ 138 $(TLIB1) \
139 $(TLIBW32) \ 139 $(TLIBW32) \
140 $(TLASTLIB) \ 140 $(TLASTLIB) \
141 $(WINMM) \ 141 $(WINMM) \
142 $(ADVAPI32) \ 142 $(ADVAPI32) \
143 $(GDI32) \ 143 $(GDI32) \
144 $(COMDLG32) \ 144 $(COMDLG32) \
@@ -146,6 +146,7 @@ LIBS = $(TLIB0) \
146 $(MPR) \ 146 $(MPR) \
147 $(SHELL32) \ 147 $(SHELL32) \
148 $(WINSPOOL) \ 148 $(WINSPOOL) \
149 $(OLE32) \
149 $(libc) 150 $(libc)
150 151
151# 152#
diff --git a/src/w32fns.c b/src/w32fns.c
index fd8df29affa..47ca9157623 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -52,6 +52,7 @@ Boston, MA 02110-1301, USA. */
52#include <shellapi.h> 52#include <shellapi.h>
53#include <ctype.h> 53#include <ctype.h>
54#include <winspool.h> 54#include <winspool.h>
55#include <objbase.h>
55 56
56#include <dlgs.h> 57#include <dlgs.h>
57#define FILE_NAME_TEXT_FIELD edt1 58#define FILE_NAME_TEXT_FIELD edt1
@@ -2514,6 +2515,13 @@ w32_msg_pump (deferred_msg * msg_buf)
2514 /* Produced by complete_deferred_msg; just ignore. */ 2515 /* Produced by complete_deferred_msg; just ignore. */
2515 break; 2516 break;
2516 case WM_EMACS_CREATEWINDOW: 2517 case WM_EMACS_CREATEWINDOW:
2518 /* Initialize COM for this window. Even though we don't use it,
2519 some third party shell extensions can cause it to be used in
2520 system dialogs, which causes a crash if it is not initialized.
2521 This is a known bug in Windows, which was fixed long ago, but
2522 the patch for XP is not publically available until XP SP3,
2523 and older versions will never be patched. */
2524 CoInitialize (NULL);
2517 w32_createwindow ((struct frame *) msg.wParam); 2525 w32_createwindow ((struct frame *) msg.wParam);
2518 if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0)) 2526 if (!PostThreadMessage (dwMainThreadId, WM_EMACS_DONE, 0, 0))
2519 abort (); 2527 abort ();
@@ -3660,6 +3668,10 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3660 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3668 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3661 goto dflt; 3669 goto dflt;
3662 3670
3671 case WM_DESTROY:
3672 CoUninitialize ();
3673 return 0;
3674
3663 case WM_CLOSE: 3675 case WM_CLOSE:
3664 wmsg.dwModifiers = w32_get_modifiers (); 3676 wmsg.dwModifiers = w32_get_modifiers ();
3665 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3677 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);