emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 55198d1796: Don't allow moving fullscreen frames on Haiku


From: Po Lu
Subject: master 55198d1796: Don't allow moving fullscreen frames on Haiku
Date: Tue, 17 May 2022 21:23:59 -0400 (EDT)

branch: master
commit 55198d179671739048701068fb1f40056d37c493
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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 0952392210..af20d1c11c 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]