]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't allow moving fullscreen frames on Haiku
authorPo Lu <luangruo@yahoo.com>
Wed, 18 May 2022 01:23:32 +0000 (01:23 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 18 May 2022 01:23:32 +0000 (01:23 +0000)
* src/haikuterm.c (haiku_set_window_size): Fix typo in comment.
(haiku_set_offset): Prevent offset from changing in fullboth
frames.

src/haikuterm.c

index 0952392210882fc3599dabf5aa2bb9880fd1fd0e..af20d1c11c846f41f3acc866e5da54086d29cbf6 100644 (file)
@@ -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;