From 55198d179671739048701068fb1f40056d37c493 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 18 May 2022 01:23:32 +0000 Subject: [PATCH] Don't allow moving fullscreen frames on Haiku * src/haikuterm.c (haiku_set_window_size): Fix typo in comment. (haiku_set_offset): Prevent offset from changing in fullboth frames. --- src/haikuterm.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/haikuterm.c b/src/haikuterm.c index 09523922108..af20d1c11c8 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -1991,7 +1991,7 @@ haiku_set_window_size (struct frame *f, bool change_gravity, /* Only do this if the fullscreen status has actually been applied. */ && f->want_fullscreen == FULLSCREEN_NONE - /* And if the configury during frame completion has been + /* And if the configury during frame creation has been completed. Otherwise, there will be no valid "old size" to go back to. */ && FRAME_OUTPUT_DATA (f)->configury_done) @@ -4352,6 +4352,22 @@ void haiku_set_offset (struct frame *frame, int x, int y, int change_gravity) { + Lisp_Object lframe; + + /* Don't allow moving a fullscreen frame: the semantics of that are + unclear. */ + + XSETFRAME (lframe, frame); + if (EQ (Fframe_parameter (lframe, Qfullscreen), Qfullboth) + /* Only do this if the fullscreen status has actually been + applied. */ + && frame->want_fullscreen == FULLSCREEN_NONE + /* And if the configury during frame creation has been + completed. Otherwise, there will be no valid "old position" + to go back to. */ + && FRAME_OUTPUT_DATA (frame)->configury_done) + return; + if (change_gravity > 0) { frame->top_pos = y; -- 2.39.2