[Top][All Lists]

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

Re: Add function to make frame topmost?

From: Jan Djärv
Subject: Re: Add function to make frame topmost?
Date: Sat, 01 May 2010 10:00:50 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv: Gecko/20100317 Thunderbird/3.0.4

Lennart Borgman skrev 2010-05-01 00.13:
On Sat, May 1, 2010 at 12:02 AM, Jan Djärv<address@hidden>  wrote:

30 apr 2010 kl. 22.54 skrev Stefan Monnier<address@hidden>:

I see, thanks.  I don't know if there's a word for such things under X11
(I guess we should ask the freedesktop guys).

You can tell the window manager that you would like to be topmost, but the
window manager is free to ignore your request. You cant know for sure what
will happen.

Thanks Jan. But how are tooltip frames handled on X by Emacs then?

They have the flag override redirect set, that tells the window manager not to touch them at all. This means that if they want to get mouse and keyboard events they have to grab the mouse and keyboard, as menus for example do.

If you have several override-redirect windows, the X stacking order determines who is topmost (XRaiseWindow and XLowerWindow functions). Usually a override redirect window becomes topmost when it is created.

Windows that aren't override redirect windows are at the mercy of the window manager, it can choose to ignore XRaiseWindow/XLowerWindow done by windows.

On w32 you can say that a window (on a level corresponding to Emacs
frame) should be topmost. This is ortogonal to activating the app. And
the topmost property is per window, not per app.

Is this the same (sub)structure as on X?

Stacking order is per window. In the extended window manager specification, there is a section on stacking, and what hints a window can have. There is also an "Urgency" hint to indicate that this window is somehow urgent. Exactly what that means is up to the window manager. From EWMH:

"Stacking order

To obtain good interoperability between different Desktop Environments, the following layered stacking order is recommended, from the bottom:

    * windows of type _NET_WM_TYPE_DESKTOP
    * windows having state _NET_WM_STATE_BELOW
    * windows not belonging in any other layer
* windows of type _NET_WM_TYPE_DOCK (unless they have state _NET_WM_TYPE_BELOW) and windows having state _NET_WM_STATE_ABOVE
    * focused windows having state _NET_WM_STATE_FULLSCREEN

Windows that are transient for another window should be kept above this window.

The window manager may choose to put some windows in different stacking positions, for example to allow the user to bring currently a active window to the top and return it back when the window looses focus. "

        Jan D.

reply via email to

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