* src/haikufns.c (haiku_create_frame): Set configury_done and do
pending fullscreen change if any.
* src/haikuterm.c (haiku_fullscreen): Defer actually setting
fullscreen until configury_done is set.
* src/haikuterm.h (struct haiku_output): New field
`configury_done'.
BWindow_center_on_screen (FRAME_HAIKU_WINDOW (f));
unblock_input ();
+ FRAME_OUTPUT_DATA (f)->configury_done = true;
+
+ if (f->want_fullscreen != FULLSCREEN_NONE)
+ FRAME_TERMINAL (f)->fullscreen_hook (f);
+
/* Make sure windows on this frame appear in calls to next-window
and similar functions. */
Vwindow_list = Qnil;
static void
haiku_fullscreen (struct frame *f)
{
+ /* When FRAME_OUTPUT_DATA (f)->configury_done is false, the frame is
+ being created, and its regular width and height have not yet been
+ set. This function will be called again by haiku_create_frame,
+ so do nothing. */
+ if (!FRAME_OUTPUT_DATA (f)->configury_done)
+ return;
+
if (f->want_fullscreen == FULLSCREEN_MAXIMIZED)
{
EmacsWindow_make_fullscreen (FRAME_HAIKU_WINDOW (f), 0);
/* The pending position we're waiting for. */
int pending_top, pending_left;
+
+ /* Whether or not adjust_frame_size and haiku_set_offset have yet
+ been called by haiku_create_frame. */
+ bool configury_done;
};
struct x_output