From: Po Lu Date: Sat, 15 Jan 2022 05:30:28 +0000 (+0000) Subject: Find a way to make lowering frames work on Haiku X-Git-Tag: emacs-29.0.90~3042 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=43618cd44c44568947732aacfe99919f25202343;p=emacs.git Find a way to make lowering frames work on Haiku * doc/lispref/frames.texi (Raising and Lowering): Document that lowering frames is now supported on Haiku. * src/haikuterm.c (haiku_frame_raise_lower): Implement a hack to lower frames. --- diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index ca7d9ada0ba..2eeb8b7ed74 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -3154,10 +3154,8 @@ raises @var{frame} above all other child frames of its parent. @deffn Command lower-frame &optional frame This function lowers frame @var{frame} (default, the selected frame) below all other frames belonging to the same or a higher z-group as -@var{frame}.@footnote{Lowering frames is not supported on Haiku, due -to limitations imposed by the system.} If @var{frame} is a child -frame (@pxref{Child Frames}), this lowers @var{frame} below all other -child frames of its parent. +@var{frame}. If @var{frame} is a child frame (@pxref{Child Frames}), +this lowers @var{frame} below all other child frames of its parent. @end deffn @defun frame-restack frame1 frame2 &optional above diff --git a/src/haikuterm.c b/src/haikuterm.c index 3e99cc1c8d9..ad89985b748 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -370,6 +370,13 @@ haiku_frame_raise_lower (struct frame *f, bool raise_p) BWindow_sync (FRAME_HAIKU_WINDOW (f)); unblock_input (); } + else + { + block_input (); + BWindow_send_behind (FRAME_HAIKU_WINDOW (f), NULL); + BWindow_sync (FRAME_HAIKU_WINDOW (f)); + unblock_input (); + } } /* Unfortunately, NOACTIVATE is not implementable on Haiku. */