aboutsummaryrefslogtreecommitdiffstats
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorMartin Rudalics2025-12-22 11:01:53 +0100
committerMartin Rudalics2025-12-22 11:01:53 +0100
commitf3d9371a890699fe4047f693adfcd4d8dbe2fb7d (patch)
treed37fd603addf836483df8ebcf78c53cd0407d991 /src/termhooks.h
parent5cf8af22900d359c18a75d9efed44f7c1d8fc06c (diff)
downloademacs-f3d9371a890699fe4047f693adfcd4d8dbe2fb7d.tar.gz
emacs-f3d9371a890699fe4047f693adfcd4d8dbe2fb7d.zip
Add functions to set frame size and position in one compound step
* lisp/frame.el (set-frame-size-and-position): New function. * src/frame.c (adjust_frame_size): Handle requests to set size and position. (Fset_frame_size_and_position_pixelwise): New function. * src/gtkutil.c (xg_frame_set_size_and_position): New function. (xg_wm_set_size_hint): Handle any non-NorthWestGravity values for child frames only. Some GTK implementations don't like them. * src/gtkutil.h (xg_frame_set_size_and_position.): Add external declaration. * src/termhooks.h (set_window_size_and_position_hook): New hook. * src/w32term.c (w32_set_window_size_and_position): New function. (w32_create_terminal): Make it the Microsoft Windows API set_window_size_and_position_hook. * src/xterm.c (x_set_window_size_and_position_1) (x_set_window_size_and_position): New functions. (x_create_terminal): Make x_set_window_size_and_position the set_window_size_and_position_hook for the X protocol. * src/xterm.h (x_set_window_size_and_position): Add external declaration. * etc/NEWS: Announce new functions.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index e688ed40c0f..5e861051498 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -684,6 +684,11 @@ struct terminal
684 void (*set_window_size_hook) (struct frame *f, bool change_gravity, 684 void (*set_window_size_hook) (struct frame *f, bool change_gravity,
685 int width, int height); 685 int width, int height);
686 686
687 /* This hook is called to change the size and position of frame F's
688 native (underlying) window. */
689 void (*set_window_size_and_position_hook) (struct frame *f, int width,
690 int height);
691
687 /* CHANGE_GRAVITY is 1 when calling from Fset_frame_position, 692 /* CHANGE_GRAVITY is 1 when calling from Fset_frame_position,
688 to really change the position, and 0 when calling from 693 to really change the position, and 0 when calling from
689 *_make_frame_visible (in that case, XOFF and YOFF are the current 694 *_make_frame_visible (in that case, XOFF and YOFF are the current