emacs-diffs
[Top][All Lists]
Advanced

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

master 966ec5dae6: Fix starting Emacs with -mm or -fs on Haiku


From: Po Lu
Subject: master 966ec5dae6: Fix starting Emacs with -mm or -fs on Haiku
Date: Mon, 21 Mar 2022 22:48:09 -0400 (EDT)

branch: master
commit 966ec5dae6a86cca6a76a4a28e4cdd86a6bf8b23
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix starting Emacs with -mm or -fs on Haiku
    
    * src/haikuterm.c (haiku_set_window_size): Disallow setting the
    window size if the frame is fullscreen, like most X window
    managers.
---
 src/haikuterm.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/haikuterm.c b/src/haikuterm.c
index 221bdfd2ee..efaafbfac2 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -1835,6 +1835,22 @@ static void
 haiku_set_window_size (struct frame *f, bool change_gravity,
                       int width, int height)
 {
+  Lisp_Object frame;
+
+  /* On X Windows, window managers typically disallow resizing a
+     window when it is fullscreen.  Do the same here.  */
+
+  XSETFRAME (frame, f);
+  if (!NILP (Fframe_parameter (frame, Qfullscreen))
+      /* 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
+        completed.  Otherwise, there will be no valid "old size" to
+        go back to.  */
+      && FRAME_OUTPUT_DATA (f)->configury_done)
+    return;
+
   haiku_update_size_hints (f);
 
   if (FRAME_HAIKU_WINDOW (f))



reply via email to

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