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: David De La Harpe Golden
Subject: Re: Add function to make frame topmost?
Date: Sun, 02 May 2010 02:18:52 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)

Lennart Borgman wrote:

Thanks. Yes, it looks easy to add the w32 part. (And there is no BOTTOMMOST.)

I think this is useful for reminders/appointments, log tail buffers etc.

Uhm.

If, say, the _user wanted_ an emacs frame showing a log tail buffer always visible, setting always-on-top on the emacs frame might be something the user might choose to do (which might be what you meant by "useful for log tail buffers", granted).

A frame showing a log tail buffer in particular that has just spat out some output might use the simple demands-attention* to draw some mild attention to itself, without being so presumptuous as to request activation or raise-frame itself (or worse always-on-top itself).

Come to think of it, ringing the bell should probably demands-attention, so that something (beep)ing in a frame that's not visible isn't missed.

*
On my system, the interpretation of demands-attention for a frame that's not immediately visible is that its task bar entry is bolded and starts gently pulsing blue. demands attention? :

"""
_NET_WM_STATE_DEMANDS_ATTENTION indicates that some action in or with the window happened. For example, it may be set by the Window Manager if the window requested activation but the Window Manager refused it, or the application may set it if it finished some work. This state may be set by both the Client and the Window Manager. It should be unset by the Window Manager when it decides the window got the required attention (usually, that it got activated).
"""

;; could be recast as a frame parameter if introduced,
;; just a test function.
(defun x-set-frame-wants-love (&optional frame)
    (x-send-client-message
     frame 0 frame "_NET_WM_STATE" 32
     '(1 "_NET_WM_STATE_DEMANDS_ATTENTION" 0 1)))

(progn
  (sleep-for 10)
  (x-set-frame-wants-love))

C-x C-e
<minimise frame, wait 10 secs>














reply via email to

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