thumb|300px|The [[windowing system based on the X11 protocol keeps display server and window manager as separate components.]]
An X window manager is a window manager that runs on top of the X Window System, a windowing system mainly used on Unix-like systems.
Unlike MacOS Classic, macOS, and Microsoft Windows platforms (excepting Microsoft Windows explorer.exe shell replacements), which have historically provided a vendor-controlled, fixed set of ways to control how windows and panes display on a screen, and how the user may interact with them, window management for the X Window System was deliberately kept separate from the software providing the graphical display. The user can choose between various third-party window managers, which differ from one another in several ways, including:
- customizability of appearance and functionality:
- textual menus used to start programs and/or change options
- docks and other graphical ways to start programs
- multiple desktops and virtual desktops (desktops larger than the physical monitor size), and pagers to switch between them
- consumption of memory and other system resources
- degree of integration with a desktop environment, which provides a more complete interface to the operating system, and provides a range of integrated utilities and applications.
How X window managers work
When a window manager is running, some kinds of interaction between the X server and its clients are redirected through the window manager. In particular, whenever an attempt to show a new window is made, this request is redirected to the window manager, which decides the initial position of the window. Additionally, most modern window managers are reparenting, which usually leads to a banner being placed at the top of the window and a decorative frame being drawn around the window. These two elements are controlled by the window manager rather than the program. Therefore, when the user clicks or drags these elements, it is the window manager that takes the appropriate actions (such as moving or resizing the window).
Window managers are also responsible for icons. Indeed, icons do not exist at the X Window System core protocol level. When the user requests a window to be iconified, the window manager unmaps it (makes it non-visible) and takes the appropriate actions to show an icon in its place. Most modern window managers do not literally show icons to represent iconified windows anymore. Often, an auxiliary toolbar program will allow access to iconified windows.
While the main aim of a window manager is to manage the windows, many window managers have additional features such as handling mouse clicks in the root window, presenting panes and other visual elements, handling some keystrokes (e.g., Alt-F4 may close a window), deciding which application to run at start-up, etc.
Standardized protocols exist to allow normal clients to communicate with the window manager. The original one is Inter-Client Communication Conventions Manual (ICCCM) but this has been superseded by the Extended Window Manager Hints (EWMH). These protocols allow clients to request titles for windows and icons, check if a window is iconified which might be docked or minimized, and possibly customize windows decorations, what virtual desktop the window occupies. and others.
Extensible window managers
Some window managers are extensible, or programmable, by user scripts.
In these window managers, users can define new actions or override the default, or reactions to various events, like window size and position changes, window creation and deletion, key and mouse input, timer, etc. They often provide on-the-fly code execution, too.
Some examples of such window managers and their programming languages are:
- Awesome – Lua
- KWin – ECMAScript
- Qtile – Python
- Sawfish – rep, Lisp dialect
- Xmonad – Haskell
- StumpWM – Common Lisp
- GWM – WOOL, Lisp dialect
- Bspwm – C
See also
- Comparison of X window managers
- Re-parenting window manager for a popular implementation technique
- X Window System protocols and architecture for context
- Windowing system
- Wmctrl - a command-line utility used to control windows in EWMH and NetWM compatible window managers
- xdotool - another command-line utility used to control windows
- Wayland compositor
References
External links
- The Comprehensive List of Window Managers for Unix
- ArchWiki List of Window Managers for Linux
