emacs-devel
[Top][All Lists]
Advanced

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

Re: Add function to make frame topmost?


From: Lennart Borgman
Subject: Re: Add function to make frame topmost?
Date: Mon, 3 May 2010 14:47:23 +0200

On Fri, Apr 30, 2010 at 3:48 AM, Lennart Borgman
<address@hidden> wrote:
> Could something like this please be added to w32fns.c?
>
> DEFUN ("x-set-frame-topmost", Fx_set_frame_topmost,
> Sx_set_frame_topmost, 1, 3, 0,
>       doc: /* Make frame FRAME topmost if TOP, otherwise not topmost.
> When ACTIVATE try to activate freme. */)
>     (frame, top, activate)
>     Lisp_Object frame, top, activate;
> {
>  FRAME_PTR f = check_x_frame (frame);
>  HWND hwndInsertAfter = NILP (top) ? HWND_NOTOPMOST : HWND_TOPMOST;
>  UINT swp_flags = SWP_NOMOVE | SWP_NOSIZE;
>  if (NILP (activate)) swp_flags = swp_flags | SWP_NOACTIVATE;
>  BLOCK_INPUT;
>  /* non-zero success, 0 fail + use GetLastError. */
>  SetWindowPos (FRAME_W32_WINDOW (f), hwndInsertAfter,
>                0, 0, 0, 0,
>                swp_flags);
>  UNBLOCK_INPUT;
>  return Qnil;
> }


The frame is not always redrawn as I expected. It looks like I need to
tell Emacs to redraw the frame after this. How do I do that?




reply via email to

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