No description
Find a file
Marcus Ramberg ed8f054605
wlr_layer: don't validate pre-commit on a destroyed layer surface
Clients unmap a layer surface by destroying the zwlr_layer_surface_v1
role, then attaching a nil buffer and committing the still-live
wl_surface. The layer-surface pre_commit_hook is not removed on role
destruction, and `destroyed` resets the cached state to Default (size 0,
no anchor). The post-destroy commit then trips the width-0/height-0
anchor validation and posts a protocol error on the dead object, killing
the client (e.g. quickshell/dms closing a panel).

Bail out of the hook once the role is no longer alive.

Fixes: https://github.com/Smithay/smithay/issues/1979
2026-07-26 21:09:44 +02:00
.github github: Fix check list in PR template 2026-03-20 13:00:36 +01:00
anvil chore: Clippy warning fixes 2026-04-20 11:49:42 +02:00
benches Run cargo +nightly fmt --all 2026-04-09 12:54:11 +02:00
examples Run cargo +nightly fmt --all 2026-04-09 12:54:11 +02:00
smallvil Run cargo +nightly fmt --all 2026-04-09 12:54:11 +02:00
smithay-drm-extras Run cargo +nightly fmt --all 2026-04-09 12:54:11 +02:00
src wlr_layer: don't validate pre-commit on a destroyed layer surface 2026-07-26 21:09:44 +02:00
test_clients Run cargo +nightly fmt --all 2026-04-09 12:54:11 +02:00
wlcs_anvil Run cargo +nightly fmt --all 2026-04-09 12:54:11 +02:00
.gitignore Add /wlcs to .gitignore 2025-09-17 11:50:43 +02:00
.rustfmt.toml Remove unstable rustfmt options 2018-04-17 17:48:20 +02:00
AI.md Various capitalization and typo fixes. 2026-02-23 13:27:09 +01:00
build.rs Implement optional Tracy GPU profiling 2026-01-09 18:40:15 +01:00
Cargo.toml Use 2024 Rust edition 2026-04-09 12:54:11 +02:00
CHANGELOG.md Add info about new Space stacking functions to the CHANGELOG 2026-03-17 13:22:31 +01:00
clippy.toml msrv: Bumb to 1.85 2025-11-07 19:59:43 +01:00
compile_wlcs.sh Bump WLCS to v1.8.1 2025-09-17 11:50:43 +02:00
CONTRIBUTING.md fix: typos 2026-02-12 12:48:05 +01:00
DCO.md readme: Add Developer Certificate of Origin 2026-02-23 13:27:09 +01:00
doc_index.html travis: add a redirect doc homepage 2017-10-01 20:34:24 +02:00
GETTING_STARTED.md Various capitalization and typo fixes. 2026-02-23 13:27:09 +01:00
LICENSE.txt Update names 2022-06-23 16:46:15 +00:00
README.md docs: add emskin to the list of compositors using Smithay 2026-04-14 15:48:28 +02:00
test_gbm_bo_create_with_modifiers2.c allocator/gbm: Allow customizing usage flags 2023-02-10 21:00:07 +01:00
test_gbm_bo_get_fd_for_plane.c gbm: detect gbm_bo_get_fd_for_plane 2022-10-03 09:54:07 +02:00
typos.toml fix: typos 2026-02-12 12:48:05 +01:00

Smithay

Crates.io docs.rs CI Matrix IRC

A smithy for rusty Wayland compositors

Goals

Smithay aims to provide building blocks to create wayland compositors in Rust. While not being a full-blown compositor, it'll provide objects and interfaces implementing common functionalities that pretty much any compositor will need, in a generic fashion.

It supports the core Wayland protocols, the official protocol extensions, and some external extensions, such as those made by and for wlroots and KDE

Also:

  • Documented: Smithay strives to maintain a clear and detailed documentation of its API and its functionalities. Compiled documentations are available on docs.rs for released versions, and here for the master branch.
  • Safety: Smithay will target to be safe to use, because Rust.
  • Modularity: Smithay is not a framework, and will not be constraining. If there is a part you don't want to use, you should not be forced to use it.
  • High-level: You should be able to not have to worry about gory low-level stuff (but Smithay won't stop you if you really want to dive into it).

Getting started

If you want to learn how to build a compositor with Smithay, consider this getting started guide.

Anvil

Smithay as a compositor library has its own sample compositor: anvil.

To get information about it and how you can run it visit anvil README

Other compositors that use Smithay

  • Cosmic: Next generation Cosmic desktop environment
  • Catacomb: A Wayland Mobile Compositor
  • emskin: A nested Wayland compositor for embedding any app inside Emacs
  • MagmaWM: A versatile and customizable Wayland Compositor
  • Niri: A scrollable-tiling Wayland compositor
  • Strata: A cutting-edge, robust and sleek Wayland compositor
  • Pinnacle: A WIP Wayland compositor, inspired by AwesomeWM
  • Sudbury: Compositor designed for ChromeOS
  • wprs: Like xpra, but for Wayland, and written in Rust.
  • Local Desktop: An Android app for running GUI Linux via PRoot and Wayland.
  • Otto: A gesture-driven stacking compositor.

System Dependencies

(This list can depend on features you enable)

  • libwayland
  • libxkbcommon
  • libudev
  • libinput
  • libgbm
  • libseat
  • xwayland

Contact us

If you have questions or want to discuss the project with us, our main chatroom is on Matrix: #smithay:matrix.org.

Contributing

General notes on contributing to Smithay can be found here.

Please note that to submit code to Smithay, you have to agree to our Developer Certificate of Origin.

If you are used to using generative AI, please ensure you read our Policy before engaging.