Chapter 4. Window Attributes
The window attributes control a window’s background and border pattern or color, the events that should be queued for it, and so on. This chapter describes how to set and get window attributes and provides a detailed description of each attribute. Everyone should read this chapter.
Now that you know the basic X concepts and you have seen the code for an X application, we can go back and start to describe various aspects of Xlib in full detail. This chapter describes the window attributes thoroughly. The window attributes were introduced in 2.2.1 Window Characteristics and described in more detail in 2.4.1 Window Attributes. You should read those sections before proceeding.
The setting of window attributes becomes necessary when you use
XCreateWindow() instead of the simpler
XCreateSimpleWindow(). However, it is not essential
that you set any window attributes other than the window background and
border. Therefore, this chapter is mainly about optional features that you
may find useful.
You will continue to find this chapter useful as a reference even when you are an experienced X programmer. A useful quick reference to the window attributes is also provided inside the back cover of Volume Two, Xlib Reference Manual.
4.1 Setting Window Attributes
Window attributes can be set while creating a window with
XCreateWindow() or afterward with a call to
XChangeWindowAttributes(). When creating a window
with XCreateSimpleWindow(), most of the attributes are inherited ...