Metacity
Metacity is a lightweight, compositing window manager for the X Window System, originally developed as the default window manager for the GNOME 2 desktop environment, emphasizing simplicity, usability, and seamless integration with GNOME rather than extensive customization or visual effects.[1][2] It implements key standards such as the Extended Window Manager Hints (EWMH) and Inter-Client Communication Conventions Manual (ICCCM) to ensure compatibility with desktop applications.[1] Designed by Havoc Pennington and first released in version 2.3 in 2002, Metacity was introduced to provide a "boring" yet reliable window management experience for non-technical users, using GTK+ for its window decorations and focusing on good default behaviors like keyboard shortcuts (e.g., Alt+Tab for window switching) and configurable button layouts on window titles.[3][4] It became a core component of GNOME starting with version 2.2 and remained the standard until GNOME 3 in 2011, when it was succeeded by Mutter—a fork incorporating Clutter for hardware-accelerated compositing—as the new default window manager.[5][6] Although largely superseded in modern GNOME sessions, Metacity continues to be actively maintained and serves as the primary window manager for GNOME Flashback, a lightweight alternative session that recreates the traditional GNOME 2.x layout and functionality for users preferring a classic desktop experience without the full overhead of GNOME Shell.[7] Its configuration is handled via GSettings schemas, allowing adjustments to themes, workspaces, focus modes, and more, with support for a simple theme system including defaults like Crux and Gorilla.[1] The project, now supported by Red Hat for maintenance, remains available in distributions like Ubuntu and Arch Linux for legacy or performance-oriented setups.[1]Overview
Definition and Purpose
Metacity is a lightweight, stacking window manager for the X Window System, designed primarily for integration with the GNOME desktop environment.[1][8] It implements the Inter-Client Communication Conventions Manual (ICCCM) and Extended Window Manager Hints (EWMH) protocols to manage client windows, ensuring compatibility with standard X11 applications. The primary purpose of Metacity is to provide simple, efficient window decoration, management, and focus handling tailored for nontechnical users, prioritizing reliability and usability over advanced visual effects or complex configurations.[8][1] Developed as part of the GNOME Project, it handles essential tasks such as resizing, moving, minimizing, and maximizing windows without requiring user expertise in window management concepts.[1][9] As the default window manager for GNOME 2, Metacity exemplified this focus by delivering a minimalistic yet robust interface that integrated seamlessly with GTK+ themes for window frames and decorations.[10] It was later replaced by Mutter in GNOME 3 to incorporate compositing capabilities.[6][11]Historical Context
Metacity was originally developed by Havoc Pennington while working at Red Hat, with its initial release as version 2.3 occurring in 2001.[3][4] This lightweight window manager was designed to integrate seamlessly with the GNOME desktop environment, emphasizing simplicity over complex visual effects.[1] In 2002, Metacity was adopted as the default window manager for GNOME 2.2, succeeding earlier options like Enlightenment and Sawfish to enhance simplicity and tighter integration with GNOME's core components.[12] This shift prioritized a "boring" yet reliable approach to window management, aligning with GNOME's usability goals.[13] Key enhancements followed in subsequent releases, including the addition of basic compositing support in version 2.20 in 2007, which enabled subtle visual effects like window shadows without relying on external compositors.[14] Further modernization came with version 3.12 in 2013, when Metacity was ported to the GTK 3 toolkit to maintain compatibility with evolving GNOME technologies. Metacity's role evolved with the release of GNOME 3 in 2011, where it was replaced by Mutter as the default window manager to support the new GNOME Shell's integrated compositing and shell features.[5] Despite this transition, Metacity persists in legacy GNOME sessions such as GNOME Flashback, and serves as the basis for the Marco window manager in the MATE desktop environment, providing continuity for users preferring traditional workflows.[15] As of November 2025, Metacity remains actively maintained, with its latest stable release, version 3.57.1, ensuring ongoing support for compatible desktop environments.[16]Design Philosophy
Core Principles
Metacity's development was guided by a philosophy emphasizing simplicity and reliability, as articulated by its creator, Havoc Pennington, who described it as a "boring window manager for the adult in you."[1] This approach prioritizes stability and straightforward functionality over flashy or experimental elements, likening Metacity to plain Cheerios in contrast to the overly ornate "Marshmallow Froot Loops" of other window managers.[1] The core aim was to create a tool that integrates seamlessly into the GNOME desktop environment without introducing unnecessary distractions or instability. A central principle is the focus on usability for everyday users through sensible defaults that minimize the need for configuration. Pennington positioned Metacity in the "choose good defaults" camp, rejecting the proliferation of options that could overwhelm users or lead to suboptimal choices.[1] By hard-coding effective behaviors—such as standard keybindings for window switching and workspace navigation—Metacity ensures that most users can operate it out of the box without delving into preferences, thereby reducing the cognitive load associated with desktop management.[17] To combat feature creep, Metacity deliberately omits advanced or niche capabilities that might confuse average users, adhering to a "no crackrock" policy against addictive but low-value features.[1] For instance, options like iconified workspaces or complex tiling layouts were excluded to avoid complicating the user experience, even though some exceptions, such as basic multiple workspaces, were included with reluctance due to their potential to bewilder newcomers.[1] This selective restraint helps maintain a clean, predictable interface, preventing the bloat that Pennington criticized in free software interfaces where excessive preferences often introduce more bugs than benefits.[17] This design ethos draws from Pennington's broader views on free software user interfaces, which advocate for clean, consistent experiences aligned with GNOME's Human Interface Guidelines (HIG).[17] By prioritizing HIG compliance, Metacity supports productive workflows without obstructing the user's primary tasks, fostering an environment where the window manager recedes into the background to enhance overall desktop harmony.[17] As an example of controlled customization, theme support allows visual adjustments while keeping the underlying mechanics simple and unaltered.[1]Simplicity and Usability Focus
Metacity emphasizes usability for nontechnical users by providing intuitive behaviors that minimize disruption in everyday desktop interactions. It defaults to "click-to-focus" mode, requiring explicit user action to activate windows and thereby preventing accidental activations from mouse movements over adjacent windows.[1] This setting is configurable via gsettings, allowing users to switch to "sloppy" or "mouse" focus modes for automatic focus-follows-mouse behavior if preferred, ensuring flexibility without overwhelming defaults.[1] Additionally, Metacity integrates session management capabilities that restore window sizes, positions, and workspaces upon login, enabling seamless transitions between user sessions for session-aware applications.[1][8] To enhance accessibility, Metacity supports keyboard navigation through default global keybindings, such as Alt-Tab for cycling window focus and Alt-Space for the window menu, providing efficient control without relying on mouse input.[1] It offers visual feedback for window states, like highlighting active windows, and adheres to standards such as Extended Window Manager Hints (EWMH) that help prevent focus stealing and support frame extents for assistive technologies. Design choices, such as avoiding edge flipping and auto-raising, further promote accessibility by aligning with Fitts's Law to make targets easier to reach via keyboard or mouse.[1] A key aspect of Metacity's usability is its minimalist window decorations, drawn using GTK+ to inherit colors and fonts from the desktop theme without adding distracting elements.[8] These simple frames, often featuring basic title bars and controls in themes like Crux or Atlanta, prioritize application content visibility and contribute to a clean, uncluttered desktop environment.[1] This approach stems from Metacity's origins as a replacement for more complex window managers like Sawfish, focusing instead on straightforward integration with GNOME.[8]Features
Window Management Basics
Metacity handles the fundamental aspects of window management in the GNOME desktop environment by managing the lifecycle and interaction of application windows. Upon window creation, Metacity automatically applies decorations such as title bars and borders, which are rendered using GTK and customizable through themes set via gsettings. These decorations include standard controls for minimizing, maximizing, resizing, and closing windows, with the window manager ensuring proper placement while considering elements like panels to avoid overlaps.[1][1] Users interact with windows primarily through mouse and keyboard inputs configured for simplicity. Left-clicking on a window's title bar or client area raises and focuses it, while dragging the title bar or borders enables moving or resizing the window; holding Shift during these operations enables snapping to adjacent windows, . Right-clicking the title bar opens a context menu for actions like minimizing or maximizing, and middle-clicking lowers the window behind others. Keyboard shortcuts include Alt+Tab to cycle through open windows in most-recently-used order, with urgent windows prioritized, and Ctrl+Alt+Left/Right arrows to switch workspaces.[1] Metacity supports workspace management to organize multiple virtual desktops, configurable between 1 and 36 via the gsettings key org.gnome.desktop.wm.preferences num-workspaces, with a default of 1. Windows can be assigned to specific workspaces or set to follow the user across them, and switching occurs seamlessly via keybindings or dragging windows during navigation. This setup complies with the Extended Window Manager Hints (EWMH) specification for interoperability with other GNOME components.[1]Visual and Compositing Capabilities
Metacity introduced basic compositing capabilities in version 2.22, released as part of GNOME 2.22 in March 2008, allowing for graphical enhancements such as transparency, drop shadows on windows, and fade effects directly within the window manager without relying on external compositing tools.[18] This addition aligned with GNOME's emphasis on simplicity, providing subtle visual improvements while ensuring compatibility across a wide range of hardware.[18] The core visual features include window shadows for depth perception, adjustable opacity for individual windows, and basic animations during minimize and maximize operations, all rendered efficiently using the XRender extension of the X Window System to minimize performance overhead.[14][18] These capabilities enable smoother interactions, such as live previews during Alt+Tab window switching, without the resource demands of hardware-accelerated rendering.[18] Metacity leverages GTK for drawing window frames, ensuring consistent visual integration with GNOME applications. In the Ubuntu 8.10 release later that year, Metacity's compositing features were more readily accessible, enhancing visual feedback for users through effects like shadowed menus and transparent elements while preserving the window manager's lightweight profile and low resource consumption.[19][20] Unlike more elaborate compositors, Metacity lacks support for advanced 3D transformations or full-screen redrawing effects seen in tools like Compiz, prioritizing reliable, subtle enhancements over flashy animations to maintain stability and efficiency on diverse systems.[18][20]Customization Options
Metacity provides users with several mechanisms to personalize its appearance and behavior, primarily through the GNOME configuration system. The theming system supports GTK-based themes that define the look of window borders, titlebars, and buttons, allowing for consistent integration with the broader desktop environment. Clearlooks served as the default theme in GNOME versions 2.12 through 3, offering a clean, semi-transparent design optimized for readability.[21] Themes can be changed using thegsettings command, such as gsettings set org.gnome.desktop.wm.preferences theme 'Atlanta', or via graphical tools like GNOME Tweaks for easier selection from installed options.[1] Included themes, such as Crux (a minimalist frame with subtle gradients) and Gorilla (featuring bold, rounded elements), demonstrate the variety available for different aesthetic preferences.
Button layout customization enables users to adjust the position and order of window controls, including the menu button, minimize, maximize, and close buttons, typically placing them on the left or right side of the titlebar. This is configured via the gsettings key org.[gnome](/page/GNOME).desktop.wm.preferences button-layout, for example, gsettings set org.[gnome](/page/GNOME).desktop.wm.preferences button-layout '[menu](/page/Menu):minimize,maximize,close' to align buttons on the right with a menu on the left.[9] Such adjustments accommodate user workflows, such as mimicking macOS-style left-aligned buttons with ':minimize,maximize,close'.[9]
For performance optimization, Metacity's simple animations—used for actions like window minimization—can be toggled off globally through the desktop interface settings. The command gsettings set org.gnome.desktop.interface enable-animations false disables these effects, reducing CPU usage on lower-end hardware while maintaining core functionality.[1] This option is particularly useful in environments prioritizing responsiveness over visual polish.
Behavior tweaks further enhance usability, including focus modes that determine how windows gain input focus: 'click' (default, requires clicking), 'sloppy' (focus on mouse enter, no click), or 'mouse' (focus on hover, without raising the window). These are set with gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'.[22] Raise-on-click can be enabled or disabled via gsettings set org.gnome.desktop.wm.preferences raise-on-click true, ensuring clicked windows come to the foreground without altering focus independently.[23] Workspace auto-placement options control where new windows appear, such as on the current workspace by default, configurable through related preferences like org.gnome.desktop.wm.preferences new-windows-strictly-behind false to avoid placing them behind active ones.[24]
Technical Implementation
Architecture and Components
Metacity is implemented primarily in the C programming language, leveraging the GTK toolkit for rendering window decorations and frames. Originally built with GTK 2 for compatibility with early GNOME environments, it underwent a port to GTK 3 in 2014 to support contemporary widget rendering and theming capabilities.[7][25][26] The architecture employs a modular design that isolates the core window manager from broader desktop components, facilitating easier maintenance and integration with various environments. Central to this structure is libmetacity, a dedicated library that handles private internals such as theme parsing and drawing primitives. Additionally, libwnck integrates extensions for features like pagers and tasklists, enabling modular enhancements without altering the core codebase.[1][27] At its heart, Metacity operates through a primary event loop that processes X11 protocol messages for tasks including window creation, movement, resizing, and focus management. The theme engine, built atop GTK, interprets XML-based theme files to generate visual elements like titlebars and borders, ensuring seamless alignment with user-selected GTK themes.[28][1] Configurable build options further emphasize efficiency, such as the--disable-sm flag, which omits session management support and reduces the binary size by around 70 KB. This lightweight approach minimizes dependencies—relying only on essentials like GTK, Pango, and libstartup-notification—while maintaining broad compatibility across Linux distributions and hardware configurations. As of November 2025, the latest stable release is version 3.58.1 (from 2023), with ongoing maintenance by the GNOME project.[1][29]
Standards and Compatibility
Metacity provides full support for the Extended Window Manager Hints (EWMH) specification developed by freedesktop.org, which defines a set of protocols for modern window managers to interact with desktop environments and applications. It also implements the legacy Inter-Client Communication Conventions Manual (ICCCM), ensuring interoperability with traditional X11 clients.[1] The project's COMPLIANCE file in the source repository details this adherence, outlining complete or partial compliance with EWMH version 1.3 properties such as root window properties (_NET_SUPPORTED, _NET_CLIENT_LIST), application window properties (_NET_WM_NAME, _NET_WM_DESKTOP), and protocols like _NET_WM_PING. Through EWMH, Metacity enables key features including desktop icons via workarea definitions and multi-monitor setups by supporting desktop geometry and client list stacking. For session management, Metacity connects to the session manager using the X Session Management Protocol (XSMP), compatible with tools like XSM, allowing it to save and restore window states such as sizes, positions, and workspace assignments upon respawning.[1] Text rendering in window titles and themes relies on the Pango library, which handles complex internationalized layouts and markup for fonts and styles.[28] Metacity further ensures broad accessibility by supporting UTF-8 encoding for window titles and other text elements, facilitating use in diverse linguistic environments.[1] Metacity maintains backward compatibility with older X11 applications through its robust ICCCM implementation, preventing issues with legacy software that predates EWMH.[1] Simultaneously, it incorporates modern X11 extensions like XRender for compositing, enabling features such as window shadows and transparency without requiring external compositors.[14] This dual approach allows seamless operation across a wide range of X11-based software, from vintage clients to contemporary GNOME-integrated applications.[1]Development History
Initial Development and Releases
Metacity was developed by Havoc Pennington in 2001 while he was employed at Red Hat, with the goal of creating a lightweight and straightforward window manager to serve as the default for the GNOME 2 desktop environment, addressing the need for simplicity and reliability in response to issues observed in prior window managers.[4][3] This project aligned with GNOME's emphasis on usability, drawing from Pennington's experience maintaining Red Hat's earlier window manager implementations.[3] From its inception, Metacity was released under the GPL-2.0-or-later license and hosted as part of the GNOME Project, ensuring open collaboration and integration within the ecosystem.[1][30] The initial alpha release, version 2.3, arrived in 2002, marking Metacity's entry as an experimental yet promising component for GNOME.[4][1][31] This was followed by the first stable release, version 2.4.2, on October 5, 2002, which introduced core functionality focused on minimalism and tight integration with GTK+ for drawing elements. Metacity was officially incorporated into GNOME 2.2 with its release in June 2003, solidifying its role as the environment's standard window manager and enabling seamless theming based on GTK+ styles.[32] Subsequent early milestones built on this foundation for greater refinement. Version 2.6, released in September 2004, enhanced basic theming support and stability, allowing better customization of window decorations while maintaining the manager's lightweight profile. By version 2.12 in September 2005, Metacity had achieved significant improvements in reliability and performance, aligning closely with the requirements of GNOME 2.12 and incorporating numerous bug fixes to support broader desktop adoption.[33]Evolution and Maintenance
Following the introduction of GNOME 3 in 2011, which replaced Metacity with Mutter as the default window manager, Metacity continued to evolve primarily to support legacy and alternative GNOME sessions. It was retained as the core window manager for GNOME Flashback, a session aimed at preserving the traditional GNOME 2.x interface using modern technologies.[7] Additionally, Metacity was forked as Marco for the MATE desktop environment, which sought to maintain a GNOME 2-like experience independently of GNOME 3's redesign.[34] To ensure compatibility with evolving GNOME toolkits, Metacity underwent a significant port to GTK 3 in version 3.12.0, released in June 2014. This update allowed Metacity to draw window frames using GTK 3, inheriting theme consistency and modern rendering capabilities while retaining its X11-based architecture. The 3.x release series, initiated around 2011, has emphasized incremental improvements over major overhauls, with the latest version, 3.58.1, released in September 2025. This series focuses on refining existing functionality rather than introducing new features, as evidenced by release notes highlighting bug fixes, translation updates, and build optimizations.[35] Maintenance of Metacity occurs actively through its GitLab repository at GNOME, where development prioritizes stability and compatibility for its niche use cases. The project maintains 19 branches, including stable releases and maintenance lines, with recent commits addressing minor issues such as dependency updates and localization—often contributed by individuals like Anders Jonsson.[1] Bug reports and feature requests are handled via the integrated GitLab issues tracker, enabling community and developer collaboration on resolutions. The project's HACKING file provides guidance for contributors, outlining build requirements (e.g., GTK+ >= 2.10 and GIO >= 2.25.10), logging mechanisms for debugging, and principles for modular code extensions—such as separating core logic from UI elements that depend on GDK/GTK headers—to facilitate targeted patches without broad disruptions.[36][37]Usage and Integration
Role in GNOME Environments
Metacity served as the default window manager for the GNOME 2 desktop environment, providing core window decoration, focus management, and basic compositing features integrated with GTK+ toolkits.[38] In this role, it handled essential tasks such as drawing window frames, managing keyboard shortcuts, and supporting theme customizations, ensuring a lightweight and consistent user experience across GNOME 2-based distributions like Ubuntu and Red Hat Enterprise Linux 6.[6] To maintain compatibility with later GNOME versions, Metacity is employed in GNOME Flashback sessions, which emulate the traditional GNOME 2.x interface on GNOME 3.x and later platforms (including GNOME 40 and subsequent versions).[7] This setup delivers classic window management behaviors, including side-by-side tiling and panel integration, while leveraging modern GTK+ 3 technologies for stability on contemporary hardware.[7] GNOME Flashback officially supports Metacity as its primary window manager, though alternatives like Mutter can be substituted, preserving the 2D-focused workflow without the full shell overhead of GNOME Shell.[7] Configuration of Metacity as the session window manager in GNOME environments uses gconf in GNOME 2 setups. For GNOME 3 and later, install the gnome-session-flashback package and select the "GNOME Flashback (Metacity)" session from the login screen.[38][7] It integrates with gnome-session to form a complete desktop, where Metacity manages window lifecycle events while gnome-session orchestrates startup and component loading.[8] For runtime adjustments, users can invoke Metacity from the command line withmetacity --replace to supplant an active window manager without restarting the session.[39]
In the MATE desktop environment, a fork known as Marco functions as the default window manager, retaining Metacity's core architecture while adapting to MATE's panel and applet ecosystem.[40] Marco handles rendering of MATE panels, applets, and notifications as standard windows, ensuring seamless interaction with components like the taskbar and system tray in this GNOME 2-inspired environment.[41] This variant enables a classic 2D desktop experience on modern systems, where historical benchmarks from 2010 indicated Metacity could outperform Mutter by up to 19% in some graphics-intensive tasks by minimizing compositing overhead.[42] As of 2025, Metacity continues to be maintained for GNOME Flashback, with versions compatible up to GNOME 47, and is available in major distributions like Ubuntu 24.04 and Fedora.[15][43]