Next: , Up: Windows   [Contents][Index]


8.1 Window Attributes

Many attributes are described in the related sections.

First, basic attributes, like name, class, ID, etc.

Function: window-name window

Return the name associated with window.

Function: window-full-name window

Return the full-name associated with window. This may or may not be the same as the normal name.

Sawfish provides functions to ensure that window names are unique.

Function: uniquify-name proposal existing

Uniquify the string proposal against the list of strings existing. Uses the format string uniquify-name-format to generate unique names.

Variable: uniquify-name-format

Format to create unique window names. Defaults to "%s [%d]".

Function: uniquify-window-name window
Command: uniquify-window-name window

Force window to have a unique title.

Function: rename-window win name

Change the window’s name to name. This works in practice, but technically ICCCM doesn’t suppose window name changes.

Function: window-class window #!optional spec

If the optional argument spec is nil, returns the class that window belongs to as a string, or nil if window has no associated class.

ICCCM class consists of “Instance” and “Class”. If spec is the symbol cons, then the cons of the form (instance . class) is returned. If spec is the symbol configurator, then the string of the form “instance/class” is returned.

Function: window-role window

Return the window role set by NET_WM_ROLE.

Function: window-id window

If window object window has a client window associated with, return an integer defining its xid, otherwise return nil.

Function: root-window-id

Returns the numeric ID of the root window of the managed screen.

Function: window-dimensions window

Returns the size of the window window in a cons cell (width . height). This does not include the frame. The size including the frame is returned by window-frame-dimensions. (see Frame Functions)

Function: window-position window

Returns the position of the window decorated with the frame in a cons-cell (x . y).

Function: display-window-position #!optional window

Display window’s position and size in a popup. If the argument is nil or called as a command, user chooses the window by cursor and click.

This function is defined in sawfish.wm.util.display-wininfo.

Function: get-window-wm-protocols window

Return a list of symbols defining the X11 window manager protocols supported by client window.

Function: window-supports-wm-protocol-p window atom

Return true if window includes atom in its WM_PROTOCOLS property.

Function: window-pid window

Returns the window process ID, or nil if not available.

Listed here are window visibility predicates: stacking-visibility, window-obscured (see Stacking Visibility), window-visible-p (see Showing and Hiding Windows), window-shaped-p (see Shading Windows), window-iconified-p (see Iconifying Windows), window-in-workspace-p (see Workspaces and Windows), window-outside-viewport-p (see Windows and Viewports).

Various predicates:

Function: window-mapped-p window

Return t if the client window associated with object window is mapped. (Note that this doesn’t necessarily mean that it is visible.)

Function: window-shaped-p window

Return t if window is shaped (possibly not rectangular).

Function: window-urgent-p window

Return t if the “Urgency” hint of the window associated with window is set.

Function: window-wants-input-p window
Function: window-really-wants-input-p window

See See Input Focus.


Next: , Up: Windows   [Contents][Index]