diff options
| author | Jason Rumney | 2001-10-27 22:30:55 +0000 |
|---|---|---|
| committer | Jason Rumney | 2001-10-27 22:30:55 +0000 |
| commit | 65906840aeb3196b0a0bd97e6f65c63bc225e081 (patch) | |
| tree | e0c15cc7fa24814095e65b6ed44587a7081c5a0a /src | |
| parent | abb15ebda6ca4e0666881173ae1db9df06cbb8a1 (diff) | |
| download | emacs-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.c | 26 |
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; | |||
| 307 | extern Lisp_Object Vw32_num_mouse_buttons; | 307 | extern Lisp_Object Vw32_num_mouse_buttons; |
| 308 | extern Lisp_Object Vw32_recognize_altgr; | 308 | extern Lisp_Object Vw32_recognize_altgr; |
| 309 | 309 | ||
| 310 | extern HWND w32_system_caret_hwnd; | ||
| 311 | extern int w32_system_caret_width; | ||
| 312 | extern int w32_system_caret_height; | ||
| 313 | extern int w32_system_caret_x; | ||
| 314 | extern 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. */ |
| 312 | void | 318 | void |
| @@ -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; |