Fundamentals of the X Window System
Kluwer Academic Publishers eBooks · 2005
ConclusionsChapter 2 examines the mechanism of window creation by Xlib and briefly discusses the X protocol and interaction between window managers and other applications. For most if not all applications, the programmer need not be concerned with those issues because these are handled by various toolkits. However they are important issues because they are the basis of the X Window SystemCreating applications with Xlib alone can be a formidable process. The program in Listing 2.1 is misleadingly simple. Not only does the window lack functionality, it also lacks significant features needed to conform to the ICCCM (see Section 1.1.3). The Xt takes care of the latter, and it also provides mechanisms for adding functionality, so in most applications the programmer does not have to worry about conforming to ICCCM or attaching properties to a window.While window creation is always hidden from the application by the toolkits, user-generated events may not be. For such events the user must deal directly with the XEvent (union of) structure(s). Depending on the toolkit being used it may even be necessary to deal with some window properties (Section 4.2.6 shows how to handle the WM_DELETE_WINDOW message from Xt).