The X Window System
Total Page:16
File Type:pdf, Size:1020Kb
The X Window System Version y z x James Gettys Philip L Karlton and Scott McGregor Digital Equipment Corp oration Silicon Graphics Computer Systems CRL Decemb er Abstract The X Window System has b ecome widely accepted by manymanufac turers X provides network transparent access to displayservers allowing lo cal and remote client programs to access a users display X is used on high p erformance workstation displays as well as terminals and client programs run on everything from micro to sup er computers This pap er describ es the tradeos and basic design decisions made during the design of X Version We presume familiarity with the pap er describing XVersion Keywords X Window System interactivehumancomputer interface sys tem distributed systems c Digital Equipment Corp oration and Silicon Graphics Computer Systems All rights reserved The X Window System is a Massachusetts Institute of Technology trademark This pap er will app ear in a sp ecial issue of SoftwarePractice and Experience y Digital Equipment Corp oration Cambridge ResearchLab One Kendall Square Bldg Cambridge MA USA jgcrldeccom z Silicon Graphics Computer Systems Systems Software Division N Shore line Boulevard Mountain View CA USA karltonsgicom x Formerly at Digital Equipment Corp oration now at The Santa Cruz Op eration Encinal Street PO Box Santa Cruz CA USA mcgregorscocom The X Window System Version 11 JAMES GETTYS Digital Equipment Corporation, Cambridge Research Laboratory One Kendall Square, Bld 700 Cambridge, MA 02139, U.S.A. [email protected] PHILIP L. KARLTON Silicon Graphics Computer Systems, Systems Software Division, 2011 N. Shoreline Boulevard Mountain View, CA 94039-7311, U.S.A. [email protected] SCOTT MCGREGOR1 Digital Equipment Corporation [email protected] SUMMARY The X Window System2 has become widely accepted by many manufacturers. X pro- vides network transparent access to display servers, allowing local and remote client pro- grams to access a user’s display. X is used on high performance workstation displays as well as terminals, and client programs run on everything from micro to super computers. This paper describes the tradeoffs and basic design decisions made during the design of X Version 11. We presume familiarity with the paper describing X Version 101. KEY WORDS X Window System Interactive Human-computer interface system Distributed Systems 1Now at The Santa Cruz Operation, 400 Encinal Street, P.O. Box 1900, Santa Cruz, California 95061 2The X Window System is a trademark of the Massachusetts Institute of Technology. © by Digital Equipment Corporation and Silicon Graphics Computer Systems, all rights reserved. This paper will appear in a special issue of Software Practice and Experience. 2 J. GETTYS, P. L. KARLTON, S. MCGREGOR Contents Introduction ............................................................................................................ 3 Goals of Version 11 Design .................................................................................... 4 Lessons Learned from Previous X Versions.......................................................... 5 Display Support ...................................................................................................... 7 Windows .................................................................................................................. 9 Atoms, Property Lists and Selections ................................................................. 12 Atoms ........................................................................................................... 13 Properties..................................................................................................... 13 Selections ..................................................................................................... 14 Primary ........................................................................................................ 15 Secondary..................................................................................................... 16 Events ................................................................................................................... 17 Window Management Functions ......................................................................... 19 Graphics ................................................................................................................ 23 Graphics Operations ................................................................................... 25 Graphics Contexts ....................................................................................... 26 Text Painting and Font Support.......................................................................... 29 Extensions............................................................................................................. 31 Keyboards ............................................................................................................. 31 Distributed Systems Architecture ....................................................................... 33 Lessons Learned and Results ............................................................................. 33 Future Topics ........................................................................................................ 37 Acknowledgments................................................................................................. 38 References ............................................................................................................. 39 November 21, 1990 THE X WINDOW SYSTEM - VERSION 11 3 Introduction The X Window System has become widely used over the last several years. After the release of Version 10 of X (hereafter called X10) from MIT in the fall of 1985, and its release as a product under Ultrix1 the following January, many people at several corporations and universities requested extensions to X to support their favorite application or hardware. X10 had been limited to what several people could implement, and these limitations were typi- cally well known (and even documented). For example, X10 could only support displays with no more than 16 bits/pixel, and this limitation was inherent in many areas of the wire protocol. Design of Version 11 started late in the spring of 1986. A larger set of contributors added expertise and experience in areas where it had been lacking in X10. The design was circulated for public comment and review that summer. A sample implementation of the protocol design started that fall, and became available in the fall of 1987. Feedback from reviewers and alpha and beta testers resulted in significant design changes to the core protocol, and deletions of some functions which were found to be poorly designed. (These functions were left to future extensions to X11). A brief history of events is available in The X Window System2. The X11 protocol was designed with little idea of how it would be implemented and was fully specified before the implementation began. It is of course true, however, that if we did not un- derstand how to implement something in a reasonable amount of time and effort (since timeli- ness was critical) we did not add it to the design; for example, non-rectangular windows have been added as an extension since the original release. We did not understand at the time how easy they would be to implement, and therefore explicitly rejected them during the design meet- ing. The specification was changed during alpha and beta test as we learned from the imple- mentation; often errors in the specification or design flaws were uncovered as the implementa- tion proceeded. We are very skeptical of systems that have never been implemented before widespread adoption; similarly, systems that have not been carefully specified before imple- mentation begins are also suspect. Somewhat after the base window system work, other groups began design of a number of toolkits and window managers for X.4,30 Feedback from these groups was particularly impor- tant to the base window system design. In this paper, X10 and X11 are used to refer to specific X versions, when we must distinguish between them. 1 Ultrix is a trademark of Digital Equipment Corporation. November 21, 1990 4 J. GETTYS, P. L. KARLTON, S. MCGREGOR Goals of Version 11 Design “The only thing worse than generalizing from a single example is generalizing from no exam- ples at all.” - Phil Karlton We realized at the first design meeting that it was impossible to design a protocol that was both upward compatible with X10 and able to support the different kinds of display hardware we could foresee. Additionally, we wished to support many window management policies that X10 could not support, such as window “decoration” and tiling. This fact and the long “wish list” required a complete redesign of X. The major goals for X11 included: • Redesign of the basic protocol encoding to increase efficiency and reduce server round trips • Support for deep frame buffers (more than 16 bits per pixel) • Support for a wider variety of color maps • Clean basic pixel-oriented graphics • Text capabilities for WYSIWYG editors • Clean up and generalization of facilities (a laundry list from X10) • Extensible protocol • Facilities for clients to exchange information (cut and paste of arbitrary information) At the first design meeting, we decided that at initial release the X11 core protocol would NOT support: • Three dimensional graphics • Sub-pixel graphics and anti-aliasing • World coordinate systems • Video, speech, high-fidelity