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.
This commit is contained in:
Po Lu 2022-03-22 02:46:35 +00:00
parent df5fb5fafa
commit 966ec5dae6

View file

@ -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))