summaryrefslogtreecommitdiff
path: root/java/org
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2025-12-23 10:39:45 +0800
committerPo Lu <luangruo@yahoo.com>2025-12-23 10:39:45 +0800
commitb0140bcd44326632538dc377dd336b82a1df4dd9 (patch)
treedab1a81e3369797347d317b9fd11b033fe5e3aba /java/org
parent22070c6f2f2cf31861642295ec215a177741c361 (diff)
Implement set_window_size_and_position_hook on Android
* java/org/gnu/emacs/EmacsWindow.java (moveResizeWindow): New method, which alters all of the bounding box of a window at once. * src/android.c (android_init_emacs_window): Load method `move_resize_window'. (android_move_resize_window): Invoke this method, rather than a sequence of operations that will produce two ConfigureNotify events. * src/androidterm.c (android_set_window_size_and_position_1) (android_set_window_size_and_position): New functions; ported from X. (android_create_terminal): Register the same.
Diffstat (limited to 'java/org')
-rw-r--r--java/org/gnu/emacs/EmacsWindow.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java
index fffa2cc5d49..7cbc1c1db43 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -426,6 +426,16 @@ public final class EmacsWindow extends EmacsHandleObject
requestViewLayout ();
}
+ public synchronized void
+ moveResizeWindow (int x, int y, int width, int height)
+ {
+ rect.left = x;
+ rect.top = y;
+ rect.right = x + width;
+ rect.bottom = y + height;
+ requestViewLayout ();
+ }
+
/* Return WM layout parameters for an override redirect window with
the geometry provided here. */