diff options
| author | Juanma Barranquero | 2013-07-18 18:50:05 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2013-07-18 18:50:05 +0200 |
| commit | 945c5bb194ecdc4f3be4223dcfcd88077391975b (patch) | |
| tree | 6245bb6e2f1b76640c3ed1568aff7ce9c43d63fd | |
| parent | abd2f2a44e9225cdc89dc6643190dd13785bb48e (diff) | |
| download | emacs-945c5bb194ecdc4f3be4223dcfcd88077391975b.tar.gz emacs-945c5bb194ecdc4f3be4223dcfcd88077391975b.zip | |
Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
* lisp/frame.el (blink-cursor-timer-function, blink-cursor-suspend):
Add check for W32.
* src/keyboard.c (kbd_buffer_get_event):
* src/w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/frame.el | 6 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/keyboard.c | 8 | ||||
| -rw-r--r-- | src/w32term.c | 15 |
5 files changed, 30 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc38ef046a4..f56654af9ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-07-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * frame.el (blink-cursor-timer-function, blink-cursor-suspend): | ||
| 4 | Add check for W32 (followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se). | ||
| 5 | |||
| 1 | 2013-07-18 Michael Albinus <michael.albinus@gmx.de> | 6 | 2013-07-18 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * filenotify.el (file-notify--library): Renamed from | 8 | * filenotify.el (file-notify--library): Renamed from |
diff --git a/lisp/frame.el b/lisp/frame.el index a37d1189552..ed47afa4b94 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1709,7 +1709,7 @@ command starts, by installing a pre-command hook." | |||
| 1709 | "Timer function of timer `blink-cursor-timer'." | 1709 | "Timer function of timer `blink-cursor-timer'." |
| 1710 | (internal-show-cursor nil (not (internal-show-cursor-p))) | 1710 | (internal-show-cursor nil (not (internal-show-cursor-p))) |
| 1711 | ;; Each blink is two calls to this function. | 1711 | ;; Each blink is two calls to this function. |
| 1712 | (when (memq window-system '(x ns)) | 1712 | (when (memq window-system '(x ns w32)) |
| 1713 | (setq blink-cursor-blinks-done (1+ blink-cursor-blinks-done)) | 1713 | (setq blink-cursor-blinks-done (1+ blink-cursor-blinks-done)) |
| 1714 | (when (and (> blink-cursor-blinks 0) | 1714 | (when (and (> blink-cursor-blinks 0) |
| 1715 | (<= (* 2 blink-cursor-blinks) blink-cursor-blinks-done)) | 1715 | (<= (* 2 blink-cursor-blinks) blink-cursor-blinks-done)) |
| @@ -1729,11 +1729,11 @@ itself as a pre-command hook." | |||
| 1729 | (setq blink-cursor-timer nil))) | 1729 | (setq blink-cursor-timer nil))) |
| 1730 | 1730 | ||
| 1731 | (defun blink-cursor-suspend () | 1731 | (defun blink-cursor-suspend () |
| 1732 | "Suspend cursor blinking on NS and X. | 1732 | "Suspend cursor blinking on NS, X and W32. |
| 1733 | This is called when no frame has focus and timers can be suspended. | 1733 | This is called when no frame has focus and timers can be suspended. |
| 1734 | Timers are restarted by `blink-cursor-check', which is called when a | 1734 | Timers are restarted by `blink-cursor-check', which is called when a |
| 1735 | frame receives focus." | 1735 | frame receives focus." |
| 1736 | (when (memq window-system '(x ns)) | 1736 | (when (memq window-system '(x ns w32)) |
| 1737 | (blink-cursor-end) | 1737 | (blink-cursor-end) |
| 1738 | (when blink-cursor-idle-timer | 1738 | (when blink-cursor-idle-timer |
| 1739 | (cancel-timer blink-cursor-idle-timer) | 1739 | (cancel-timer blink-cursor-idle-timer) |
diff --git a/src/ChangeLog b/src/ChangeLog index 8a1c163998b..de80ac168bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-07-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * keyboard.c (kbd_buffer_get_event): | ||
| 4 | * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32. | ||
| 5 | Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se. | ||
| 6 | |||
| 1 | 2013-07-18 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2013-07-18 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | * filelock.c: Fix unlikely file descriptor leaks. | 9 | * filelock.c: Fix unlikely file descriptor leaks. |
diff --git a/src/keyboard.c b/src/keyboard.c index 07dce85ff29..f025d6c5dfa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4066,7 +4066,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4066 | } | 4066 | } |
| 4067 | else if (event->kind == FOCUS_OUT_EVENT) | 4067 | else if (event->kind == FOCUS_OUT_EVENT) |
| 4068 | { | 4068 | { |
| 4069 | #if defined(HAVE_NS) || defined (HAVE_X11) | 4069 | #if defined (HAVE_NS) || defined (HAVE_X11) || defined (WINDOWSNT) |
| 4070 | 4070 | ||
| 4071 | #ifdef HAVE_NS | 4071 | #ifdef HAVE_NS |
| 4072 | struct ns_display_info *di; | 4072 | struct ns_display_info *di; |
| @@ -4076,11 +4076,11 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4076 | Lisp_Object frame = event->frame_or_window; | 4076 | Lisp_Object frame = event->frame_or_window; |
| 4077 | bool focused = false; | 4077 | bool focused = false; |
| 4078 | 4078 | ||
| 4079 | for (di = x_display_list; di && ! focused; di = di->next) | 4079 | for (di = x_display_list; di && ! focused; di = FRAME_X_DISPLAY_INFO (di)->next) |
| 4080 | focused = di->x_highlight_frame != 0; | 4080 | focused = FRAME_X_DISPLAY_INFO (di)->x_highlight_frame = 0; |
| 4081 | 4081 | ||
| 4082 | if (! focused) obj = make_lispy_focus_out (frame); | 4082 | if (! focused) obj = make_lispy_focus_out (frame); |
| 4083 | #endif /* HAVE_NS || HAVE_X11 */ | 4083 | #endif /* HAVE_NS || HAVE_X11 || WINDOWSNT */ |
| 4084 | 4084 | ||
| 4085 | kbd_fetch_ptr = event + 1; | 4085 | kbd_fetch_ptr = event + 1; |
| 4086 | } | 4086 | } |
diff --git a/src/w32term.c b/src/w32term.c index 732a4f4bfef..2fe3fe07462 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2912,9 +2912,15 @@ x_focus_changed (int type, int state, struct w32_display_info *dpyinfo, | |||
| 2912 | && CONSP (Vframe_list) | 2912 | && CONSP (Vframe_list) |
| 2913 | && !NILP (XCDR (Vframe_list))) | 2913 | && !NILP (XCDR (Vframe_list))) |
| 2914 | { | 2914 | { |
| 2915 | bufp->kind = FOCUS_IN_EVENT; | 2915 | bufp->arg = Qt; |
| 2916 | XSETFRAME (bufp->frame_or_window, frame); | ||
| 2917 | } | 2916 | } |
| 2917 | else | ||
| 2918 | { | ||
| 2919 | bufp->arg = Qnil; | ||
| 2920 | } | ||
| 2921 | |||
| 2922 | bufp->kind = FOCUS_IN_EVENT; | ||
| 2923 | XSETFRAME (bufp->frame_or_window, frame); | ||
| 2918 | } | 2924 | } |
| 2919 | 2925 | ||
| 2920 | frame->output_data.x->focus_state |= state; | 2926 | frame->output_data.x->focus_state |= state; |
| @@ -2929,7 +2935,10 @@ x_focus_changed (int type, int state, struct w32_display_info *dpyinfo, | |||
| 2929 | { | 2935 | { |
| 2930 | dpyinfo->w32_focus_event_frame = 0; | 2936 | dpyinfo->w32_focus_event_frame = 0; |
| 2931 | x_new_focus_frame (dpyinfo, 0); | 2937 | x_new_focus_frame (dpyinfo, 0); |
| 2932 | } | 2938 | |
| 2939 | bufp->kind = FOCUS_OUT_EVENT; | ||
| 2940 | XSETFRAME (bufp->frame_or_window, frame); | ||
| 2941 | } | ||
| 2933 | 2942 | ||
| 2934 | /* TODO: IME focus? */ | 2943 | /* TODO: IME focus? */ |
| 2935 | } | 2944 | } |