4.3 Settable Attributes
The sections that follow describe the options and default values
for each member of the XSetWindowAttributes
structure. The attributes control a wide variety of ways for a window to
act. They can be grouped loosely to help you understand when you might
want to set each attribute.
One group of attributes controls the appearance of a window. These
are background_pixel,
background_pixmap, border_pixel,
border_ pixmap, colormap, and
cursor. Most clients will set the border, background,
and cursor but use the default colormap.
A second group is provided to allow clients to improve their
redrawing performance under certain conditions. These are
backing_pixel, backing_planes,
backing_store, bit_gravity, and
save_under. These attributes do not affect the
appearance or operation of a client. It is advisable to consider
bit_gravity when designing a client, but the code for
using these attributes can be added after a client’s functionality is
complete.
The event_mask and
do_not_propagate_mask attributes control the
selection and propagation of events. These attributes are described
briefly in this chapter but also in much more detail in Chapter 8.
The win_gravity attribute provides a means for
relocating a window automatically when its parent is resized.
Applications can take advantage of this feature to simplify the code
that positions their subwindows when they are resized.
The override_redirect attribute controls whether requests to map or reconfigure the window can be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access