diff options
| author | Eli Zaretskii | 2002-02-16 19:25:24 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2002-02-16 19:25:24 +0000 |
| commit | 9005a471f23f327dd3c6ee2cffc95f0903fec4d4 (patch) | |
| tree | c93b84e8a3bd9fcff42407411fea0ab9ab6dd9d8 /src/msdos.c | |
| parent | 94384150a60c4288978f5e28948ca3d260951e4a (diff) | |
| download | emacs-9005a471f23f327dd3c6ee2cffc95f0903fec4d4.tar.gz emacs-9005a471f23f327dd3c6ee2cffc95f0903fec4d4.zip | |
(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.
Diffstat (limited to 'src/msdos.c')
| -rw-r--r-- | src/msdos.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/msdos.c b/src/msdos.c index f5dff6fb5bc..19304db32e8 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -1200,6 +1200,9 @@ static int help_echo_pos; | |||
| 1200 | cursor moves into it. */ | 1200 | cursor moves into it. */ |
| 1201 | int x_autoselect_window_p; | 1201 | int x_autoselect_window_p; |
| 1202 | 1202 | ||
| 1203 | /* Last window where we saw the mouse. Used by x-autoselect-window. */ | ||
| 1204 | static Lisp_Object last_mouse_window; | ||
| 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 |
| @@ -3402,17 +3405,20 @@ dos_rawgetc () | |||
| 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; |