comparison src/msdos.c @ 43363:bcefd6f01283

(last_mouse_window): New variable. (dos_rawgetc): Fix last change--if the mouse is in the same window as recorded in last_mouse_window, don't select this window.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 16 Feb 2002 19:23:16 +0000
parents c89a11a2baf6
children 263456abbeb0
comparison
equal deleted inserted replaced
43362:5fe3e0ee7fd7 43363:bcefd6f01283
1197 static int help_echo_pos; 1197 static int help_echo_pos;
1198 1198
1199 /* Non-zero means automatically select any window when the mouse 1199 /* Non-zero means automatically select any window when the mouse
1200 cursor moves into it. */ 1200 cursor moves into it. */
1201 int x_autoselect_window_p; 1201 int x_autoselect_window_p;
1202
1203 /* Last window where we saw the mouse. Used by x-autoselect-window. */
1204 static Lisp_Object last_mouse_window;
1202 1205
1203 static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */ 1206 static int mouse_preempted = 0; /* non-zero when XMenu gobbles mouse events */
1204 1207
1205 /* Set the mouse pointer shape according to whether it is in the 1208 /* Set the mouse pointer shape according to whether it is in the
1206 area where the mouse highlight is in effect. */ 1209 area where the mouse highlight is in effect. */
3400 mouse_window = window_from_coordinates (SELECTED_FRAME(), 3403 mouse_window = window_from_coordinates (SELECTED_FRAME(),
3401 mouse_last_x, 3404 mouse_last_x,
3402 mouse_last_y, 3405 mouse_last_y,
3403 &mouse_area, 0); 3406 &mouse_area, 0);
3404 /* A window will be selected only when it is not 3407 /* A window will be selected only when it is not
3405 selected now and last mouse movement event was not in 3408 selected now. A minubuffer window will be selected
3406 it. A minubuffer window will be selected iff it is 3409 iff it is active. */
3407 active. */ 3410 if (!EQ (mouse_window, last_mouse_window)
3408 if (!EQ (mouse_window, selected_window) 3411 && !EQ (mouse_window, selected_window)
3409 && (!MINI_WINDOW_P (XWINDOW (mouse_window)) 3412 && (!MINI_WINDOW_P (XWINDOW (mouse_window))
3410 || (EQ (mouse_window, minibuf_window) 3413 || (EQ (mouse_window, minibuf_window)
3411 && minibuf_level > 0))) 3414 && minibuf_level > 0)))
3412 { 3415 {
3413 Fselect_window (mouse_window); 3416 Fselect_window (mouse_window);
3414 } 3417 }
3418 last_mouse_window = mouse_window;
3415 } 3419 }
3420 else
3421 last_mouse_window = Qnil;
3416 previous_help_echo = help_echo; 3422 previous_help_echo = help_echo;
3417 help_echo = help_echo_object = help_echo_window = Qnil; 3423 help_echo = help_echo_object = help_echo_window = Qnil;
3418 help_echo_pos = -1; 3424 help_echo_pos = -1;
3419 IT_note_mouse_highlight (SELECTED_FRAME(), 3425 IT_note_mouse_highlight (SELECTED_FRAME(),
3420 mouse_last_x, mouse_last_y); 3426 mouse_last_x, mouse_last_y);