mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
Fix compilation on builds with native rectangle structures
* src/androidgui.h (CONVERT_TO_NATIVE_RECT) (CONVERT_FROM_EMACS_RECT): Delete redundant macro definitions. * src/xdisp.c (Fremember_mouse_glyph) [CONVERT_TO_EMACS_RECT]: Expand CONVERT_TO_EMACS_RECT to convert native rectangles into a readable format if required. Reported by Stefan Kangas <stefankangas@gmail.com>.
This commit is contained in:
parent
892abde34e
commit
358dbbb723
@ -216,8 +216,6 @@ struct android_swap_info
|
||||
};
|
||||
|
||||
#define NativeRectangle Emacs_Rectangle
|
||||
#define CONVERT_TO_NATIVE_RECT(xr, nr) ((xr) = (nr))
|
||||
#define CONVERT_FROM_EMACS_RECT(xr, nr) ((nr) = (xr))
|
||||
|
||||
#define STORE_NATIVE_RECT(nr, rx, ry, rwidth, rheight) \
|
||||
((nr).x = (rx), (nr).y = (ry), \
|
||||
|
14
src/xdisp.c
14
src/xdisp.c
@ -3017,12 +3017,20 @@ point of FRAME. */)
|
||||
(Lisp_Object frame, Lisp_Object x, Lisp_Object y)
|
||||
{
|
||||
struct frame *f = decode_window_system_frame (frame);
|
||||
NativeRectangle r;
|
||||
NativeRectangle rect;
|
||||
#ifdef CONVERT_TO_EMACS_RECT
|
||||
Emacs_Rectangle xrect;
|
||||
#endif /* CONVERT_TO_EMACS_RECT */
|
||||
|
||||
CHECK_FIXNUM (x);
|
||||
CHECK_FIXNUM (y);
|
||||
remember_mouse_glyph (f, XFIXNUM (x), XFIXNUM (y), &r);
|
||||
return list4i (r.x, r.y, r.width, r.height);
|
||||
remember_mouse_glyph (f, XFIXNUM (x), XFIXNUM (y), &rect);
|
||||
#ifdef CONVERT_TO_EMACS_RECT
|
||||
CONVERT_TO_EMACS_RECT (xrect, rect);
|
||||
return list4i (xrect.x, xrect.y, xrect.width, xrect.height);
|
||||
#else /* !defined CONVERT_TO_EMACS_RECT */
|
||||
return list4i (rect.x, rect.y, rect.width, rect.height);
|
||||
#endif /* !defined CONVERT_TO_EMACS_RECT */
|
||||
}
|
||||
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
Loading…
Reference in New Issue
Block a user