diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-10-02 19:20:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-10-02 19:20:52 -0700 |
commit | 11bd10a7df907289382bd6f06753e274376d7629 (patch) | |
tree | 328d75ecf3ac1c6e1c391ad503577f4853f2708c /src/xterm.h | |
parent | 7118822435bafe077c73b026e9e463a10e96f09a (diff) | |
download | emacs-11bd10a7df907289382bd6f06753e274376d7629.tar.gz |
Fix x-focus-frame bug with "Not an in-range integer".
* xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
(X_ULONG_MAX): Move these macros to xterm.h.
(x_fill_property_data): Be more generous about allowing either
signed or unsigned data of the appropriate width.
* xterm.h (x_display_set_last_user_time): New function.
All setters of last_user_time changd to use this function.
If ENABLE_CHECKING, check that the times are in range.
Fixes: debbugs:18586
Diffstat (limited to 'src/xterm.h')
-rw-r--r-- | src/xterm.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/xterm.h b/src/xterm.h index c8673123611..ed611f1d19f 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -434,7 +434,7 @@ extern void select_visual (struct x_display_info *); struct x_output { -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) +#if defined (USE_X_TOOLKIT) || defined (USE_GTK) /* Height of menu bar widget, in pixels. This value is not meaningful if the menubar is turned off. */ int menubar_height; @@ -654,6 +654,13 @@ struct x_output int move_offset_left; }; +/* Extreme 'short' and 'long' values suitable for libX11. */ +#define X_SHRT_MAX 0x7fff +#define X_SHRT_MIN (-1 - X_SHRT_MAX) +#define X_LONG_MAX 0x7fffffff +#define X_LONG_MIN (-1 - X_LONG_MAX) +#define X_ULONG_MAX 0xffffffffUL + #define No_Cursor (None) enum @@ -1022,6 +1029,15 @@ x_display_pixel_width (struct x_display_info *dpyinfo) return WidthOfScreen (dpyinfo->screen); } +INLINE void +x_display_set_last_user_time (struct x_display_info *dpyinfo, Time t) +{ +#ifdef ENABLE_CHECKING + eassert (t <= X_ULONG_MAX); +#endif + dpyinfo->last_user_time = t; +} + extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object); extern void x_wait_for_event (struct frame *, int); extern void x_clear_under_internal_border (struct frame *f); |