aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-27 21:45:06 +0000
committerRichard M. Stallman1994-12-27 21:45:06 +0000
commit9f67f20bf8d13e2bf974063e2a86447e596bf3a5 (patch)
tree6009f54955bb78a8db4eacb12416a1bae1be21c6 /src
parent3d1743f7e08eafdc689ec38da0fd0d33f1db184e (diff)
downloademacs-9f67f20bf8d13e2bf974063e2a86447e596bf3a5.tar.gz
emacs-9f67f20bf8d13e2bf974063e2a86447e596bf3a5.zip
(XTupdate_begin): Fix backward test in previous change.
(x_display_box_cursor): Don't redraw old cursor spot in mouse face if cursor was on a newline. (XTread_socket): Handle button events from outside the frame, received due to grabbing the mouse with a button.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 8abd502854d..36af954ffd2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -294,7 +294,7 @@ XTupdate_begin (f)
294 294
295 /* If the frame needs to be redrawn, 295 /* If the frame needs to be redrawn,
296 simply forget about any prior mouse highlighting. */ 296 simply forget about any prior mouse highlighting. */
297 if (! FRAME_GARBAGED_P (f)) 297 if (FRAME_GARBAGED_P (f))
298 FRAME_X_DISPLAY_INFO (f)->mouse_face_window = Qnil; 298 FRAME_X_DISPLAY_INFO (f)->mouse_face_window = Qnil;
299 299
300 if (!NILP (FRAME_X_DISPLAY_INFO (f)->mouse_face_window)) 300 if (!NILP (FRAME_X_DISPLAY_INFO (f)->mouse_face_window))
@@ -3892,7 +3892,12 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
3892 3892
3893 bzero (&compose_status, sizeof (compose_status)); 3893 bzero (&compose_status, sizeof (compose_status));
3894 3894
3895 f = x_window_to_frame (event.xbutton.window); 3895 if (dpyinfo->grabbed && last_mouse_frame
3896 && FRAME_LIVE_P (last_mouse_frame))
3897 f = last_mouse_frame;
3898 else
3899 f = x_window_to_frame (event.xmotion.window);
3900
3896 if (f) 3901 if (f)
3897 { 3902 {
3898 if (!x_focus_frame || (f == x_focus_frame)) 3903 if (!x_focus_frame || (f == x_focus_frame))
@@ -4163,6 +4168,7 @@ x_display_box_cursor (f, on)
4163 && (f != x_highlight_frame)))) 4168 && (f != x_highlight_frame))))
4164 { 4169 {
4165 int mouse_face_here = 0; 4170 int mouse_face_here = 0;
4171 struct frame_glyphs *active_glyphs = FRAME_CURRENT_GLYPHS (f);
4166 4172
4167 /* If the cursor is in the mouse face area, redisplay that when 4173 /* If the cursor is in the mouse face area, redisplay that when
4168 we clear the cursor. */ 4174 we clear the cursor. */
@@ -4174,7 +4180,11 @@ x_display_box_cursor (f, on)
4174 && 4180 &&
4175 (f->phys_cursor_y < FRAME_X_DISPLAY_INFO (f)->mouse_face_end_row 4181 (f->phys_cursor_y < FRAME_X_DISPLAY_INFO (f)->mouse_face_end_row
4176 || (f->phys_cursor_y == FRAME_X_DISPLAY_INFO (f)->mouse_face_end_row 4182 || (f->phys_cursor_y == FRAME_X_DISPLAY_INFO (f)->mouse_face_end_row
4177 && f->phys_cursor_x < FRAME_X_DISPLAY_INFO (f)->mouse_face_end_col))) 4183 && f->phys_cursor_x < FRAME_X_DISPLAY_INFO (f)->mouse_face_end_col))
4184 /* Don't redraw the cursor's spot in mouse face
4185 if it is at the end of a line (on a newline).
4186 The cursor appears there, but mouse highlighting does not. */
4187 && active_glyphs->used[f->phys_cursor_y] > f->phys_cursor_x)
4178 mouse_face_here = 1; 4188 mouse_face_here = 1;
4179 4189
4180 /* If the font is not as tall as a whole line, 4190 /* If the font is not as tall as a whole line,