mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
Add the WEFT compositor-shell Wayland protocol and wire it into the compositor state. Protocol definition: - protocol/weft-shell-unstable-v1.xml: defines zweft_shell_manager_v1 (global, bound once by servo-shell) and zweft_shell_window_v1 (per-window slot). Requests: destroy, create_window, update_metadata, set_geometry. Events: configure, focus_changed, window_closed, presentation_feedback. Generated code + bindings: - crates/weft-compositor/src/protocols/mod.rs: uses wayland-scanner generate_interfaces! inside a __interfaces sub-module and generate_server_code! at the server module level, following the wayland-protocols-wlr crate structure. Exports WeftShellState (holds the GlobalId) and WeftShellWindowData (per-window user data). Server-side dispatch (state.rs): - GlobalDispatch<ZweftShellManagerV1, ()>: binds the global, inits each bound resource with unit user data. - Dispatch<ZweftShellManagerV1, ()>: handles create_window by initialising a ZweftShellWindowV1 and sending an initial configure. - Dispatch<ZweftShellWindowV1, WeftShellWindowData>: handles update_metadata (stores advisory data) and set_geometry (echoes compositor-adjusted configure back to client). WeftCompositorState.weft_shell_state initialised in new() alongside all other protocol globals. New direct deps in weft-compositor: wayland-scanner, wayland-server, wayland-backend, bitflags (all version-matched to Smithay 0.7). |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||