aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkterm.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/pgtkterm.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/pgtkterm.c')
-rw-r--r--src/pgtkterm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index b731f52983d..1ec6bfcda4e 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -5825,8 +5825,8 @@ note_mouse_movement (struct frame *frame,
5825 /* Has the mouse moved off the glyph it was on at the last sighting? */ 5825 /* Has the mouse moved off the glyph it was on at the last sighting? */
5826 r = &dpyinfo->last_mouse_glyph; 5826 r = &dpyinfo->last_mouse_glyph;
5827 if (frame != dpyinfo->last_mouse_glyph_frame 5827 if (frame != dpyinfo->last_mouse_glyph_frame
5828 || event->x < r->x || event->x >= r->x + r->width 5828 || event->x < r->x || event->x >= r->x + (int) r->width
5829 || event->y < r->y || event->y >= r->y + r->height) 5829 || event->y < r->y || event->y >= r->y + (int) r->height)
5830 { 5830 {
5831 frame->mouse_moved = true; 5831 frame->mouse_moved = true;
5832 dpyinfo->last_mouse_scroll_bar = NULL; 5832 dpyinfo->last_mouse_scroll_bar = NULL;