summaryrefslogtreecommitdiff
path: root/src/xterm.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-19 11:48:53 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-19 11:48:53 +0400
commitced135ebdbfb0eea719ce165a454e7ff0b681e88 (patch)
tree17311f84267e23afbd4d1131ea2fe1fa14aa6f55 /src/xterm.h
parentf75447737926fd8c898b9e0b77f581f4993a52f1 (diff)
downloademacs-ced135ebdbfb0eea719ce165a454e7ff0b681e88.tar.gz
* xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time, going to replace static variables below. Adjust comments. * xterm.c (last_mouse_glyph, last_mouse_glyph_frame) (last_mouse_scroll_bar, last_mouse_movement_time): Remove. (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement) (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm): Related users changed. * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame, last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and last_mouse_movement_time, going to replace static variables below. Adjust comments. * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar) (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time): Remove. (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click) (x_scroll_bar_report_motion, syms_of_w32term): Related users changed. * nsterm.h (struct ns_display_info): New members last_mouse_glyph, last_mouse_movement_time and last_mouse_scroll_bar, going to replace static variables below. * nsterm.m (last_mouse_glyph, last_mouse_movement_time) (last_mouse_scroll_bar): Remove. (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered) (mouseExited): Related users changed.
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 9f01a840e53..36aa8e52b1c 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -305,12 +305,18 @@ struct x_display_info
/* The frame waiting to be auto-raised in XTread_socket. */
struct frame *x_pending_autoraise_frame;
- /* The frame where the mouse was last time we reported a mouse event. */
+ /* The frame where the mouse was last time we reported a ButtonPress event. */
struct frame *last_mouse_frame;
+ /* The frame where the mouse was last time we reported a mouse position. */
+ struct frame *last_mouse_glyph_frame;
+
/* The frame where the mouse was last time we reported a mouse motion. */
struct frame *last_mouse_motion_frame;
+ /* The scroll bar in which the last X motion event occurred. */
+ struct scroll_bar *last_mouse_scroll_bar;
+
/* Time of last user interaction as returned in X events on this display. */
Time last_user_time;
@@ -319,6 +325,18 @@ struct x_display_info
int last_mouse_motion_x;
int last_mouse_motion_y;
+ /* Where the mouse was last time we reported a mouse position.
+ This is a rectangle on last_mouse_glyph_frame. */
+ XRectangle last_mouse_glyph;
+
+ /* Time of last mouse movement on this display. This is a hack because
+ we would really prefer that XTmouse_position would return the time
+ associated with the position it returns, but there doesn't seem to be
+ any way to wrest the time-stamp from the server along with the position
+ query. So, we just keep track of the time of the last movement we
+ received, and return that in hopes that it's somewhat accurate. */
+ Time last_mouse_movement_time;
+
/* The gray pixmap. */
Pixmap gray;