aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2001-10-27 22:30:55 +0000
committerJason Rumney2001-10-27 22:30:55 +0000
commit65906840aeb3196b0a0bd97e6f65c63bc225e081 (patch)
treee0c15cc7fa24814095e65b6ed44587a7081c5a0a /src
parentabb15ebda6ca4e0666881173ae1db9df06cbb8a1 (diff)
downloademacs-65906840aeb3196b0a0bd97e6f65c63bc225e081.tar.gz
emacs-65906840aeb3196b0a0bd97e6f65c63bc225e081.zip
(w32_wnd_proc) <WM_KILLFOCUS>: Destroy the system caret.
<WM_EMACS_DESTROY_CARET, WM_EMACS_TRACK_CARET>: Track cursor position using the system caret.
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index a4ad1e49c20..55af56303eb 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -307,6 +307,12 @@ int image_cache_refcount, dpyinfo_refcount;
307extern Lisp_Object Vw32_num_mouse_buttons; 307extern Lisp_Object Vw32_num_mouse_buttons;
308extern Lisp_Object Vw32_recognize_altgr; 308extern Lisp_Object Vw32_recognize_altgr;
309 309
310extern HWND w32_system_caret_hwnd;
311extern int w32_system_caret_width;
312extern int w32_system_caret_height;
313extern int w32_system_caret_x;
314extern int w32_system_caret_y;
315
310 316
311/* Error if we are not connected to MS-Windows. */ 317/* Error if we are not connected to MS-Windows. */
312void 318void
@@ -4785,6 +4791,12 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
4785 unregister_hot_keys (hwnd); 4791 unregister_hot_keys (hwnd);
4786 button_state = 0; 4792 button_state = 0;
4787 ReleaseCapture (); 4793 ReleaseCapture ();
4794 /* Relinquish the system caret. */
4795 if (w32_system_caret_hwnd)
4796 {
4797 DestroyCaret ();
4798 w32_system_caret_hwnd = NULL;
4799 }
4788 case WM_MOVE: 4800 case WM_MOVE:
4789 case WM_SIZE: 4801 case WM_SIZE:
4790 case WM_COMMAND: 4802 case WM_COMMAND:
@@ -4926,6 +4938,20 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
4926 DragAcceptFiles ((HWND) wParam, FALSE); 4938 DragAcceptFiles ((HWND) wParam, FALSE);
4927 return DestroyWindow ((HWND) wParam); 4939 return DestroyWindow ((HWND) wParam);
4928 4940
4941 case WM_EMACS_DESTROY_CARET:
4942 w32_system_caret_hwnd = NULL;
4943 return DestroyCaret ();
4944
4945 case WM_EMACS_TRACK_CARET:
4946 /* If there is currently no system caret, create one. */
4947 if (w32_system_caret_hwnd == NULL)
4948 {
4949 w32_system_caret_hwnd = hwnd;
4950 CreateCaret (hwnd, NULL, w32_system_caret_width,
4951 w32_system_caret_height);
4952 }
4953 return SetCaretPos (w32_system_caret_x, w32_system_caret_y);
4954
4929 case WM_EMACS_TRACKPOPUPMENU: 4955 case WM_EMACS_TRACKPOPUPMENU:
4930 { 4956 {
4931 UINT flags; 4957 UINT flags;