aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkfns.c
diff options
context:
space:
mode:
authorPaul Eggert2025-01-26 22:15:49 -0800
committerPaul Eggert2025-01-26 23:05:51 -0800
commit17a8bf53f390718756e397cc0b31c1ef2c7de5f0 (patch)
tree6b1806de3ce6ff49f159c7e677f31e3c179a31f5 /src/pgtkfns.c
parentc50e8c24247eb69d85b004a72197e710c8e1e32a (diff)
downloademacs-17a8bf53f390718756e397cc0b31c1ef2c7de5f0.tar.gz
emacs-17a8bf53f390718756e397cc0b31c1ef2c7de5f0.zip
Fix x-show-tip bignum crash
* src/pgtkfns.c (compute_tip_xy): Fix crash if user specifies bignums. Bug found with --enable-gcc-warnings.
Diffstat (limited to 'src/pgtkfns.c')
-rw-r--r--src/pgtkfns.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 21456f4f489..2c87ba8e326 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -2905,8 +2905,8 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx,
2905 2905
2906 /* Move the tooltip window where the mouse pointer is. Resize and 2906 /* Move the tooltip window where the mouse pointer is. Resize and
2907 show it. */ 2907 show it. */
2908 if ((!INTEGERP (left) && !INTEGERP (right)) 2908 if ((!FIXNUMP (left) && !FIXNUMP (right))
2909 || (!INTEGERP (top) && !INTEGERP (bottom))) 2909 || (!FIXNUMP (top) && !FIXNUMP (bottom)))
2910 { 2910 {
2911 Lisp_Object frame, attributes, monitor, geometry; 2911 Lisp_Object frame, attributes, monitor, geometry;
2912 GdkSeat *seat = 2912 GdkSeat *seat =
@@ -2955,9 +2955,9 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx,
2955 max_y = pgtk_display_pixel_height (FRAME_DISPLAY_INFO (f)); 2955 max_y = pgtk_display_pixel_height (FRAME_DISPLAY_INFO (f));
2956 } 2956 }
2957 2957
2958 if (INTEGERP (top)) 2958 if (FIXNUMP (top))
2959 *root_y = XFIXNUM (top); 2959 *root_y = XFIXNUM (top);
2960 else if (INTEGERP (bottom)) 2960 else if (FIXNUMP (bottom))
2961 *root_y = XFIXNUM (bottom) - height; 2961 *root_y = XFIXNUM (bottom) - height;
2962 else if (*root_y + XFIXNUM (dy) <= min_y) 2962 else if (*root_y + XFIXNUM (dy) <= min_y)
2963 *root_y = min_y; /* Can happen for negative dy */ 2963 *root_y = min_y; /* Can happen for negative dy */
@@ -2971,9 +2971,9 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx,
2971 /* Put it on the top. */ 2971 /* Put it on the top. */
2972 *root_y = min_y; 2972 *root_y = min_y;
2973 2973
2974 if (INTEGERP (left)) 2974 if (FIXNUMP (left))
2975 *root_x = XFIXNUM (left); 2975 *root_x = XFIXNUM (left);
2976 else if (INTEGERP (right)) 2976 else if (FIXNUMP (right))
2977 *root_x = XFIXNUM (right) - width; 2977 *root_x = XFIXNUM (right) - width;
2978 else if (*root_x + XFIXNUM (dx) <= min_x) 2978 else if (*root_x + XFIXNUM (dx) <= min_x)
2979 *root_x = 0; /* Can happen for negative dx */ 2979 *root_x = 0; /* Can happen for negative dx */