diff --git a/src/androidgui.h b/src/androidgui.h index 79e42c7947c..2bd9d3741da 100644 --- a/src/androidgui.h +++ b/src/androidgui.h @@ -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), \ diff --git a/src/xdisp.c b/src/xdisp.c index 74ccfd9e745..4185e368c96 100644 --- a/src/xdisp.c +++ b/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 */