ry edited this page Sep 14, 2010 · 9 revisions
Clone this wiki locally

Welcome to the xnotify wiki!

Wow, github has a wiki build in. Let’s use it to exchange ideas!

There is this cool documentation from O’Reilly about xlib. Seems to be rather complete:

Transient Window Field
All temporary subwindows of the root, such as pop-up menus and dialog boxes, should use XSetTransientForHint() to set the XA_WM_TRANSIENT_FOR property to the ID of the top-level window of the application that is creating the temporary window. This allows the window manager to process the temporary window accordingly (perhaps by decorating it differently than if it were a separate application). In particular, window managers will present newly mapped transient windows without requiring any user interaction, even if mapping top-level windows normally does require interaction.

It is important not to confuse XA_WM_TRANSIENT_FOR with the override_redirect window attribute. The override_redirect attribute specifies that the window manager does not get the chance to intercept the mapping request and thus no chance at all to decorate the window. This should be done only on the most temporary of windows, such as menus, or on windows that the programmer wants to be mapped without window manager intervention, such as automated demonstration programs. XA_WM_TRANSIENT_FOR should be used when other windows are allowed to be active while the transient window is visible, such as when the pointer is not grabbed while the window is popped up. If other windows must be frozen, use override_redirect and grab the pointer while the window is mapped.

Temporary windows that are popped up frequently should also set the save_under window attribute so that windows beneath the window may not need to redraw themselves quite so often.

To summarize, clients wishing to pop up a window should do one of three things:

  • They can create and map another normal top-level window, which will get decorated and managed as a separate client by the window manager. See the discussion of window groups in Section, “Window Group Field.”
  • If the window will be visible for a relatively short time and deserves a somewhat lighter treatment, they can set the XA_WM_TRANSIENT_FOR property. They can expect less decoration but should set all the normal window manager properties on the window. An example of an appropriate case would be a dialog box.
  • If the window will be visible for a very short time and should not be decorated at all, the client can set the override_redirect window attribute. In general, this should be done only if the pointer is grabbed while the window is mapped. The window manager will never interfere with these windows, which should be used with caution. An example of an appropriate use is a pop-up menu.