255 |
|
|
256 |
/* Non-zero means autoselect window with the mouse cursor. */ |
/* Non-zero means autoselect window with the mouse cursor. */ |
257 |
|
|
258 |
int x_autoselect_window_p; |
int autoselect_window_p; |
259 |
|
|
260 |
|
/* Last window where we saw the mouse. Used by autoselect-window. */ |
261 |
|
static Lisp_Object last_window; |
262 |
|
|
263 |
/* Non-zero means draw block and hollow cursor as wide as the glyph |
/* Non-zero means draw block and hollow cursor as wide as the glyph |
264 |
under it. For example, if a block cursor is over a tab, it will be |
under it. For example, if a block cursor is over a tab, it will be |
6656 |
last_mouse_motion_event = *event; |
last_mouse_motion_event = *event; |
6657 |
XSETFRAME (last_mouse_motion_frame, frame); |
XSETFRAME (last_mouse_motion_frame, frame); |
6658 |
|
|
|
#if 0 /* Lisp must not be called asynchronously, so this must |
|
|
not be done. */ |
|
|
if (x_autoselect_window_p) |
|
|
{ |
|
|
int area; |
|
|
Lisp_Object window; |
|
|
static Lisp_Object last_window; |
|
|
|
|
|
window = window_from_coordinates (frame, XINT (event->x), XINT (event->y), &area, 0); |
|
|
|
|
|
/* Window will be selected only when it is not selected now and |
|
|
last mouse movement event was not in it. Minibuffer window |
|
|
will be selected iff it is active. */ |
|
|
if (!EQ (window, last_window) |
|
|
&& !EQ (window, selected_window) |
|
|
&& (!MINI_WINDOW_P (XWINDOW (window)) |
|
|
|| (EQ (window, minibuf_window) && minibuf_level > 0))) |
|
|
Fselect_window (window); |
|
|
|
|
|
last_window=window; |
|
|
} |
|
|
#endif |
|
|
|
|
6659 |
if (event->window != FRAME_X_WINDOW (frame)) |
if (event->window != FRAME_X_WINDOW (frame)) |
6660 |
{ |
{ |
6661 |
frame->mouse_moved = 1; |
frame->mouse_moved = 1; |
10875 |
} |
} |
10876 |
|
|
10877 |
if (f) |
if (f) |
10878 |
note_mouse_movement (f, &event.xmotion); |
{ |
10879 |
|
|
10880 |
|
/* Generate SELECT_WINDOW_EVENTs when needed. */ |
10881 |
|
if (autoselect_window_p) |
10882 |
|
{ |
10883 |
|
Lisp_Object window; |
10884 |
|
int area; |
10885 |
|
|
10886 |
|
window = window_from_coordinates (f, |
10887 |
|
XINT (event.xmotion.x), XINT (event.xmotion.y), |
10888 |
|
&area, 0); |
10889 |
|
|
10890 |
|
/* Window will be selected only when it is not selected now and |
10891 |
|
last mouse movement event was not in it. Minibuffer window |
10892 |
|
will be selected iff it is active. */ |
10893 |
|
if (!EQ (window, last_window) |
10894 |
|
&& !EQ (window, selected_window) |
10895 |
|
&& numchars > 0) |
10896 |
|
{ |
10897 |
|
bufp->kind = SELECT_WINDOW_EVENT; |
10898 |
|
bufp->frame_or_window = window; |
10899 |
|
bufp->arg = Qnil; |
10900 |
|
++bufp, ++count, --numchars; |
10901 |
|
} |
10902 |
|
|
10903 |
|
last_window=window; |
10904 |
|
} |
10905 |
|
note_mouse_movement (f, &event.xmotion); |
10906 |
|
} |
10907 |
else |
else |
10908 |
{ |
{ |
10909 |
#ifndef USE_TOOLKIT_SCROLL_BARS |
#ifndef USE_TOOLKIT_SCROLL_BARS |
15116 |
staticpro (&previous_help_echo); |
staticpro (&previous_help_echo); |
15117 |
help_echo_pos = -1; |
help_echo_pos = -1; |
15118 |
|
|
15119 |
DEFVAR_BOOL ("x-autoselect-window", &x_autoselect_window_p, |
DEFVAR_BOOL ("autoselect-window", &autoselect_window_p, |
15120 |
doc: /* *Non-nil means autoselect window with mouse pointer. */); |
doc: /* *Non-nil means autoselect window with mouse pointer. */); |
15121 |
x_autoselect_window_p = 0; |
autoselect_window_p = 0; |
15122 |
|
|
15123 |
DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, |
DEFVAR_BOOL ("x-stretch-cursor", &x_stretch_cursor_p, |
15124 |
doc: /* *Non-nil means draw block cursor as wide as the glyph under it. |
doc: /* *Non-nil means draw block cursor as wide as the glyph under it. |