]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the Android port
authorPo Lu <luangruo@yahoo.com>
Mon, 27 Jan 2025 01:11:21 +0000 (09:11 +0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:03:00 +0000 (19:03 +0100)
* src/term.c (tty_frame_at) [HAVE_ANDROID]: Always return nil.

* src/terminal.c (cursor_to, raw_cursor_to) [HAVE_ANDROID]:
Don't call root_xy.

(cherry picked from commit 8d11871c63e65459fd14f1cbe08bf0460c452ac6)

src/term.c
src/terminal.c

index 777ab5f918c7e8e27d946fe0d9b5f864456d8564..e519813c7ac29d395c66afca8c7557857eae7634 100644 (file)
@@ -2597,6 +2597,7 @@ tty_draw_row_with_mouse_face (struct window *w, struct glyph_row *row,
 static Lisp_Object
 tty_frame_at (int x, int y, int *cx, int *cy)
 {
+#ifndef HAVE_ANDROID
   for (Lisp_Object frames = Ftty_frame_list_z_order (Qnil);
        !NILP (frames);
        frames = Fcdr (frames))
@@ -2613,6 +2614,7 @@ tty_frame_at (int x, int y, int *cx, int *cy)
          return frame;
        }
     }
+#endif /* !HAVE_ANDROID */
 
   return Qnil;
 }
index 17dc4770ef77238ebcc4cfad1f711cf679cf8560..668b88450292b96683066f329fa6ee6b94967790 100644 (file)
@@ -114,7 +114,11 @@ cursor_to (struct frame *f, int vpos, int hpos)
   if (term->cursor_to_hook)
     {
       int x, y;
+#ifndef HAVE_ANDROID
       root_xy (f, hpos, vpos, &x, &y);
+#else /* HAVE_ANDROID */
+      x = hpos, y = vpos;
+#endif /* !HAVE_ANDROID */
       term->cursor_to_hook (f, y, x);
     }
 }
@@ -128,7 +132,11 @@ raw_cursor_to (struct frame *f, int row, int col)
   if (term->raw_cursor_to_hook)
     {
       int x, y;
+#ifndef HAVE_ANDROID
       root_xy (f, col, row, &x, &y);
+#else /* HAVE_ANDROID */
+      x = col, y = row;
+#endif /* !HAVE_ANDROID */
       term->raw_cursor_to_hook (f, y, x);
     }
 }