summaryrefslogtreecommitdiff
path: root/src/msdos.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-02 10:45:04 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-02 10:45:04 +0400
commit1fccc5306363a88fc3f663e2a149d0251612d3e9 (patch)
tree598c320c94cf1fb004a8b09aad138d37115ec109 /src/msdos.c
parentb7da754d21b4515b3e75b9f28608d99185ea0ec3 (diff)
downloademacs-1fccc5306363a88fc3f663e2a149d0251612d3e9.tar.gz
* 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)
Mouse Highlight (and friends..)
************************************************************************/
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_mouse_window;
-
static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */
int
@@ -2668,10 +2665,10 @@ dos_rawgetc (void)
/* Generate SELECT_WINDOW_EVENTs when needed. */
if (!NILP (Vmouse_autoselect_window))
{
- mouse_window = window_from_coordinates (SELECTED_FRAME (),
- mouse_last_x,
- mouse_last_y,
- 0, 0);
+ static Lisp_Object last_mouse_window;
+
+ mouse_window = window_from_coordinates
+ (SELECTED_FRAME (), mouse_last_x, mouse_last_y, 0, 0);
/* A window will be selected only when it is not
selected now, and the last mouse movement event was
not in it. A minibuffer window will be selected iff
@@ -2686,10 +2683,9 @@ dos_rawgetc (void)
event.timestamp = event_timestamp ();
kbd_buffer_store_event (&event);
}
+ /* Remember the last window where we saw the mouse. */
last_mouse_window = mouse_window;
}
- else
- last_mouse_window = Qnil;
previous_help_echo_string = help_echo_string;
help_echo_string = help_echo_object = help_echo_window = Qnil;