emacs-devel
[Top][All Lists]
Advanced

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

Re: How about introducing a new frame parameter: topmost


From: brianjiang
Subject: Re: How about introducing a new frame parameter: topmost
Date: Wed, 4 Jun 2008 10:59:38 +0800

> > If this parameter is true, the frame is shown as a TOPMOST window.
>              
> The tricky part is to coerce the window manager into agreeing
> with Emacs.  
>              
>              
>         Stefan
It is quit easy to implement it in Windows, simply calling WIN API SetWindowPos.
Currently, I actually implement it by defining a DEFUN w32-set-frame-topmost as follows. 
But I don't know whether we can implement the same thing in X-window system and MAC
system.
 
 
DEFUN("w32-set-frame-topmost", Fw32_set_frame_topmost,
      Sw32_set_frame_topmost, 0, 2, 0,
      doc: /* update later */)
     (frame, notopmost)
     Lisp_Object frame, notopmost;
{
  FRAME_PTR f = check_x_frame (frame);
 
  HWND hWndInsertAfter;
 
  if (NILP(notopmost))
    {
      hWndInsertAfter = HWND_TOPMOST;
    }
  else
    {
      hWndInsertAfter = HWND_NOTOPMOST;
    }
 
  SetWindowPos(FRAME_W32_WINDOW(f), hWndInsertAfter, 0, 0, 0, 0,
               SWP_NOMOVE|SWP_NOSIZE);
 
  return Qnil;
}

reply via email to

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