aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.c
diff options
context:
space:
mode:
authorPo Lu2024-02-11 10:00:33 +0800
committerPo Lu2024-02-11 10:01:31 +0800
commite67e7185ce81e59c90741f92c2ba3209412f417e (patch)
treeed4a3db6efaeb3fca98df1e0e36be8b048054741 /src/androidterm.c
parent7a0ee5d65f214102734dd22edb641b164a1b73af (diff)
downloademacs-e67e7185ce81e59c90741f92c2ba3209412f417e.tar.gz
emacs-e67e7185ce81e59c90741f92c2ba3209412f417e.zip
Fix signed/unsigned promotion errors involving Emacs_Rectangle
* src/androidterm.c (android_note_mouse_movement): * src/pgtkterm.c (note_mouse_movement): * src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph) (expose_area, expose_window, gui_intersect_rectangles): Cast width or height fields in Emacs_Rectangles to int before summing with or subtracting them from their coordinate fields, as they are unsigned outside X, and the sign of the coordinates is thus not preserved.
Diffstat (limited to 'src/androidterm.c')
-rw-r--r--src/androidterm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index d4612bb20fa..2bd2b45743d 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -495,8 +495,8 @@ android_note_mouse_movement (struct frame *frame,
495 /* Has the mouse moved off the glyph it was on at the last sighting? */ 495 /* Has the mouse moved off the glyph it was on at the last sighting? */
496 r = &dpyinfo->last_mouse_glyph; 496 r = &dpyinfo->last_mouse_glyph;
497 if (frame != dpyinfo->last_mouse_glyph_frame 497 if (frame != dpyinfo->last_mouse_glyph_frame
498 || event->x < r->x || event->x >= r->x + r->width 498 || event->x < r->x || event->x >= r->x + (int) r->width
499 || event->y < r->y || event->y >= r->y + r->height) 499 || event->y < r->y || event->y >= r->y + (int) r->height)
500 { 500 {
501 frame->mouse_moved = true; 501 frame->mouse_moved = true;
502 note_mouse_highlight (frame, event->x, event->y); 502 note_mouse_highlight (frame, event->x, event->y);