(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.
+2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * 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.
+
2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
* window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
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
/* 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
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;
Lisp_Object ns_display_name_list;
long context_menu_value = 0;
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_window;
-
/* display update */
NSPoint last_mouse_motion_position;
static NSRect last_mouse_glyph;
if (!NILP (Vmouse_autoselect_window))
{
NSTRACE (mouse_autoselect_window);
- Lisp_Object window;
- window = window_from_coordinates(emacsframe, last_mouse_motion_position.x,
- last_mouse_motion_position.y, 0, 0);
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (emacsframe, last_mouse_motion_position.x,
+ last_mouse_motion_position.y, 0, 0);
+
if (WINDOWP (window)
- && !EQ (window, last_window)
+ && !EQ (window, last_mouse_window)
&& !EQ (window, selected_window)
&& (focus_follows_mouse
|| (EQ (XWINDOW (window)->frame,
emacs_event->frame_or_window = window;
EV_TRAILER2 (e);
}
- last_window = window;
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
}
if (!note_mouse_movement (emacsframe, last_mouse_motion_position.x,
static int any_help_event_p;
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_window;
-
extern unsigned int msh_mousewheel;
extern void free_frame_menubar (struct frame *);
/* Generate SELECT_WINDOW_EVENTs when needed. */
if (!NILP (Vmouse_autoselect_window))
{
- Lisp_Object window;
- int x = LOWORD (msg.msg.lParam);
- int y = HIWORD (msg.msg.lParam);
-
- window = window_from_coordinates (f, x, y, 0, 0);
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (f, LOWORD (msg.msg.lParam), HIWORD (msg.msg.lParam), 0, 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
only when it is active. */
if (WINDOWP (window)
- && !EQ (window, last_window)
+ && !EQ (window, last_mouse_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
create event iff we don't leave the
inev.kind = SELECT_WINDOW_EVENT;
inev.frame_or_window = window;
}
-
- last_window = window;
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
}
if (!note_mouse_movement (f, &msg.msg))
help_echo_string = previous_help_echo_string;
int use_xim = 0; /* configure --without-xim */
#endif
-\f
-
/* Non-zero means that a HELP_EVENT has been generated since Emacs
start. */
static bool any_help_event_p;
-/* Last window where we saw the mouse. Used by mouse-autoselect-window. */
-static Lisp_Object last_window;
-
/* This is a chain of structures for all the X displays currently in
use. */
/* Generate SELECT_WINDOW_EVENTs when needed.
Don't let popup menus influence things (bug#1261). */
if (!NILP (Vmouse_autoselect_window) && !popup_activated ())
- {
- Lisp_Object window;
-
- window = window_from_coordinates (f,
- event.xmotion.x, event.xmotion.y,
- 0, 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 only when it is active. */
- if (WINDOWP (window)
- && !EQ (window, last_window)
+ {
+ static Lisp_Object last_mouse_window;
+ Lisp_Object window = window_from_coordinates
+ (f, event.xmotion.x, event.xmotion.y, 0, 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 only when it is active. */
+ if (WINDOWP (window)
+ && !EQ (window, last_mouse_window)
&& !EQ (window, selected_window)
/* For click-to-focus window managers
create event iff we don't leave the
&& (focus_follows_mouse
|| (EQ (XWINDOW (window)->frame,
XWINDOW (selected_window)->frame))))
- {
- inev.ie.kind = SELECT_WINDOW_EVENT;
- inev.ie.frame_or_window = window;
- }
-
- last_window=window;
- }
+ {
+ inev.ie.kind = SELECT_WINDOW_EVENT;
+ inev.ie.frame_or_window = window;
+ }
+ /* Remember the last window where we saw the mouse. */
+ last_mouse_window = window;
+ }
if (!note_mouse_movement (f, &event.xmotion))
help_echo_string = previous_help_echo_string;
}