aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorPo Lu2025-12-23 10:39:45 +0800
committerPo Lu2025-12-23 10:39:45 +0800
commitb0140bcd44326632538dc377dd336b82a1df4dd9 (patch)
treedab1a81e3369797347d317b9fd11b033fe5e3aba /java
parent22070c6f2f2cf31861642295ec215a177741c361 (diff)
downloademacs-b0140bcd44326632538dc377dd336b82a1df4dd9.tar.gz
emacs-b0140bcd44326632538dc377dd336b82a1df4dd9.zip
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')
-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
426 requestViewLayout (); 426 requestViewLayout ();
427 } 427 }
428 428
429 public synchronized void
430 moveResizeWindow (int x, int y, int width, int height)
431 {
432 rect.left = x;
433 rect.top = y;
434 rect.right = x + width;
435 rect.bottom = y + height;
436 requestViewLayout ();
437 }
438
429 /* Return WM layout parameters for an override redirect window with 439 /* Return WM layout parameters for an override redirect window with
430 the geometry provided here. */ 440 the geometry provided here. */
431 441