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: Sat, 1 May 2010 04:06:04 +0200

On Sat, May 1, 2010 at 3:48 AM, David De La Harpe Golden
<address@hidden> wrote:
>>> ***
>>> One can certainly do this from within emacs as per the spec (note you
>>> do this for mapped windows by sending a client message to the root
>>> window).
>>>  Note however, that window managers may refuse an app's request to be
>>> always
>>> on top.
>>>
>>> (defun x-toggle-frame-always-on-top (&optional frame)
>>>   (x-send-client-message
>>>    frame 0 frame "_NET_WM_STATE" 32
>>>    ;; _NET_WM_STATE_REMOVE = 0
>>>    ;; _NET_WM_STATE_ADD = 1
>>>    ;; _NET_WM_STATE_TOGGLE = 2
>>>    '(2 "_NET_WM_STATE_ABOVE" 0 1)))
>>
>>
>> Does this work already?
>
> Yes, that's working code, on window managers that honour it.  But I don't
> actually recommend it for the purposes you wanted it for.

Thanks.

> Would however be vaguely okay for people who don't want to reach for the
> mouse to use the relevant window manager menu.  If it were to be included in
> emacs it would make more sense to treat it as a frame parameter at the elisp
> api level, similar to the handling of several other similar existing
> parameters, i.e. so one could write
>
> (set-frame-parameter frame 'always-on-top t)
>
> (I think this was what Stefan was saying, pretty much)


Do you mean this which I have not tried to dechiffer yet:

SM> An alternative is to use the poor-man's OO system already in place and
SM> just add a set_frame_topmost_hook to the terminal object.




reply via email to

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