Go to the first, previous, next, last section, table of contents.


outline Extension Module

This module provides different ways of drawing an outline of windows. All outline classes are client mixins and have the same interface:

Method: OutlineClient outline_show ( x = None, y = None, w = None, h = None, name = None )

Show an outline for this client's window. If an outline already is visible, it will be changed to reflect the arguments.

The arguments x, y, w and h gives the geometry of the outline. If any of these are not provided, the corresponding value from the current window geometry will be used.

If name is provided, that string will be displayed in the middle of the outline.

Method: OutlineClient outline_hide ( )

Hide the outline, if it is visible.

Currently there are two outline classes:

Client Mixin: XorOutlineClient

Draws the outline directly on the display, by xor-ing pixel values. The font used is set with the X resource plwm.outline.font/Plwm.Outline.Font. The default is fixed.

This is the most efficient outline method, but it has a few problems. If the windows under the outline changes, remains of the outline will still visible when it is hidden. The windows can be restored by e.g. iconifying and deiconifiying, switching to another view and back, or in an Emacs pressing C-l.

A bigger problem is that some combinations of depth, visual and colormap of the root window causes the xor of black to be black. This results in an invisible outline if you have a black background. This can be solved by changing the background colour of the root, or using some other outline method.

Client Mixin: WindowOutlineClient

This "draws" the outline by creating a set of thin windows, simulating drawing lines on the screen. Any name is displayed by drawing it in a centered window, using the font specified as above.

This is less efficient than an xor outline, since eight or nine windows have to be moved and resized if the outline is changed. However, it does not have any of the problems listed for XorOutlineClient.

The colours used is currently hardcoded to black and white.


Go to the first, previous, next, last section, table of contents.