aboutsummaryrefslogtreecommitdiffstats
path: root/src/msdos.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-09-02 10:45:04 +0400
committerDmitry Antipov2013-09-02 10:45:04 +0400
commit1fccc5306363a88fc3f663e2a149d0251612d3e9 (patch)
tree598c320c94cf1fb004a8b09aad138d37115ec109 /src/msdos.c
parentb7da754d21b4515b3e75b9f28608d99185ea0ec3 (diff)
downloademacs-1fccc5306363a88fc3f663e2a149d0251612d3e9.tar.gz
emacs-1fccc5306363a88fc3f663e2a149d0251612d3e9.zip
* msdos.c (last_mouse_window): Move to...
(dos_rawgetc): ...this function and adjust comment. * nsterm.m (last_window): Rename to last_mouse_window, move to... (mouseMoved): ...this function and adjust comment. * w32term.c (last_window): Likewise with... (w32_read_socket): ...this function. * xterm.c (last_window): Likewise with... (handle_one_xevent): ...this function.
Diffstat (limited to 'src/msdos.c')
-rw-r--r--src/msdos.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 025b685e26c..7142c3ada77 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -946,9 +946,6 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int str_len)
946 Mouse Highlight (and friends..) 946 Mouse Highlight (and friends..)
947 ************************************************************************/ 947 ************************************************************************/
948 948
949/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
950static Lisp_Object last_mouse_window;
951
952static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */ 949static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */
953 950
954int 951int
@@ -2668,10 +2665,10 @@ dos_rawgetc (void)
2668 /* Generate SELECT_WINDOW_EVENTs when needed. */ 2665 /* Generate SELECT_WINDOW_EVENTs when needed. */
2669 if (!NILP (Vmouse_autoselect_window)) 2666 if (!NILP (Vmouse_autoselect_window))
2670 { 2667 {
2671 mouse_window = window_from_coordinates (SELECTED_FRAME (), 2668 static Lisp_Object last_mouse_window;
2672 mouse_last_x, 2669
2673 mouse_last_y, 2670 mouse_window = window_from_coordinates
2674 0, 0); 2671 (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0);
2675 /* A window will be selected only when it is not 2672 /* A window will be selected only when it is not
2676 selected now, and the last mouse movement event was 2673 selected now, and the last mouse movement event was
2677 not in it. A minibuffer window will be selected iff 2674 not in it. A minibuffer window will be selected iff
@@ -2686,10 +2683,9 @@ dos_rawgetc (void)
2686 event.timestamp = event_timestamp (); 2683 event.timestamp = event_timestamp ();
2687 kbd_buffer_store_event (&event); 2684 kbd_buffer_store_event (&event);
2688 } 2685 }
2686 /* Remember the last window where we saw the mouse. */
2689 last_mouse_window = mouse_window; 2687 last_mouse_window = mouse_window;
2690 } 2688 }
2691 else
2692 last_mouse_window = Qnil;
2693 2689
2694 previous_help_echo_string = help_echo_string; 2690 previous_help_echo_string = help_echo_string;
2695 help_echo_string = help_echo_object = help_echo_window = Qnil; 2691 help_echo_string = help_echo_object = help_echo_window = Qnil;