crate::wayland::selection::data_device::start_dnd was removed in favor of exposing the
underlying DnDGrab and associated types to make it possible to write external Drag&Drop sources
and targets (e.g. for other shell implementations). See the Additions-section for more info.
This also means the ServerDndGrabHandler was removed. The ClientDndGrabHandler was split into
a generic DndGrabHandler and a specific WaylandDndGrabHandler. WaylandDndGrabHandler::started needs to
be implemented and explicitly start a DnDGrab for wayland DnD-operations to work.
X11WM::start_wm now needs a DisplayHandle-reference and adds requirements for the State type to
implement DndGrabHandler and the SeatHandlers PointerFocus and TouchFocus-types to implement
the new DndFocus trait.
GbmFramebufferExporter::new now accepts a NodeFilter as import node, which
enables accepting dmabufs originating from any node.
-GbmFramebufferExporter::new(gbm, node);
+GbmFramebufferExporter::new(gbm, node.into());
-GbmFramebufferExporter::new(gbm, None);
+GbmFramebufferExporter::new(gbm, NodeFilter::None);
-GbmFramebufferExporter::new(gbm, Some(node));
+GbmFramebufferExporter::new(gbm, node.into());
+GbmFramebufferExporter::new(gbm, NodeFilter::All);DrmOutputManager does now provide an explicit lock-method returning a [LockedDrmOutputManager].
All other methods have moved to this new type, allowing compositors to take the same lock across multiple
operations.
xdg_shell, layer_shell, and session_lock surfaces now track last_acked state for each commit.
You can find it in the last_acked field of the corresponding ...CachedState structs.
The "current state" and "current serial" attribute fields were removed; use last_acked from the new with_committed_state() accessors instead (and verify that you didn't actually want with_pending_state() instead where you used the "current state").
-ToplevelSurface::current_state();
+ToplevelSurface::with_committed_state(|state| {
+ // ...
+});
-PopupSurface::current_state();
+PopupSurface::with_committed_state(|state| {
+ // ...
+});
-LayerSurface::current_state();
+LayerSurface::with_committed_state(|state| {
+ // ...
+});
-LockSurface::current_state();
+LockSurface::with_committed_state(|state| {
+ // ...
+});
struct XdgToplevelSurfaceRoleAttributes {
- configured: bool,
- configure_serial: Option<Serial>,
- current: ToplevelState,
- current_serial: Option<Serial>,
- last_acked: Option<ToplevelState>,
+ last_acked: Option<ToplevelConfigure>,
// ...
}
struct XdgPopupSurfaceRoleAttributes {
- configured: bool,
- configure_serial: Option<Serial>,
- current: PopupState,
- current_serial: Option<Serial>,
- committed: bool,
- last_acked: Option<PopupState>,
+ last_acked: Option<PopupConfigure>,
// ...
}
struct LayerSurfaceAttributes {
- configured: bool,
- configure_serial: Option<Serial>,
- current: LayerSurfaceState,
- last_acked: Option<LayerSurfaceState>,
+ last_acked: Option<LayerSurfaceConfigure>,
// ...
}
-impl Copy for LayerSurfaceCachedState;The following methods are no longer needed as Smithay does them automatically now:
-ToplevelSurface::reset_initial_configure_sent();
-PopupSurface::reset_initial_configure_sent();You also no longer need to manually set LayerSurfaceAttributes::initial_configure_sent, Smithay handles it automatically.
- ExtBackgroundEffect protocol is now available in
smithay::wayland::background_effectmodule.
crate::input::dnd was introduced to enable implementation of Drag&Drop operations on custom types.
Internally the same types and traits are used to implement wayland::data_device dnd-operations and XDND
operations (see below).
DnDGrab is the new entry-point for DnD operations. It requires SeatHandler::PointerFocus or
SeatHandler::TouchFocus respectively to implement DndFocus, which is used to send events to
types, which can be targets of DnD operations. Source is a new trait for types that represent
sources of data for DnD operations.
The Xwayland WM can now handle XDND operations and bridge them over to the new generic DnD interface allowing DnD operations between X11 and Wayland clients (both directions).
X11Surface now has a new surface_under-method, which is also internally used by SpaceElement::is_in_input_region and crate::desktop::Window::surface_under. Any direct usage of under_from_surface_tree on the underlying wl_surface of an X11Surface should be replaced with this method for XDND to work correctly.
xdg_shell and layer_shell now enforce the client acking a configure before committing a buffer, as required by the protocols.
struct ToplevelCachedState {
/// Configure last acknowledged by the client at the time of the commit.
last_acked: Option<ToplevelConfigure>,
}
/// Provides access to the current committed cached state.
fn ToplevelSurface::with_cached_state<T>(&self, f: impl FnOnce(&ToplevelCachedState) -> T) -> T;
/// Provides access to the current committed state.
fn ToplevelSurface::with_committed_state<T>(&self, f: impl FnOnce(Option<&ToplevelState>) -> T) -> T;
struct PopupCachedState {
/// Configure last acknowledged by the client at the time of the commit.
last_acked: Option<ToplevelConfigure>,
}
/// Provides access to the current committed cached state.
fn PopupSurface::with_cached_state<T>(&self, f: impl FnOnce(&PopupCachedState) -> T) -> T;
/// Provides access to the current committed state.
fn PopupSurface::with_committed_state<T>(&self, f: impl FnOnce(Option<&PopupState>) -> T) -> T;
struct LayerSurfaceCachedState {
/// Configure last acknowledged by the client at the time of the commit.
last_acked: Option<LayerSurfaceConfigure>,
// ...
}
/// Provides access to the current committed cached state.
fn LayerSurface::with_cached_state<T>(&self, f: impl FnOnce(&LayerSurfaceCachedState) -> T) -> T;
/// Provides access to the current committed state.
fn LayerSurface::with_committed_state<T>(&self, f: impl FnOnce(Option<&LayerSurfaceState>) -> T) -> T;
struct LockSurfaceCachedState {
/// Configure last acknowledged by the client at the time of the commit.
last_acked: Option<LockSurfaceConfigure>,
}
/// Provides access to the current committed cached state.
fn LockSurface::with_cached_state<T>(&self, f: impl FnOnce(&LockSurfaceCachedState) -> T) -> T;
/// Provides access to the current committed state.
fn LockSurface::with_committed_state<T>(&self, f: impl FnOnce(Option<&LockSurfaceState>) -> T) -> T;
struct LockSurfaceAttributes {
server_pending: Option<LockSurfaceState>,
pending_configures: Vec<LockSurfaceConfigure>,
last_acked: Option<LockSurfaceConfigure>,
}
type LockSurfaceData = Mutex<LockSurfaceAttributes>;
struct LockSurfaceConfigure {
state: LockSurfaceState,
serial: Serial,
}Added Element::is_framebuffer_effect and RenderElement::capture_framebuffer to better support render elements,
that take the current framebuffers contents and modify them, e.g. blurring the backgrounds of windows.
See the documentation for these functions for how to make use of them, but note, that they provide
default implementations, which result in skipping the new functionality. As such any custom RenderElements wrappers
(not using crate::render_elements!) need to be updated.
DrmSyncobjHandler::drm_syncobj_state is now Optional.
Whenever state is None ImportTimeline request will result in InvalidTimeline protocol error.
This allows one to destroy DrmSyncobjState by calling DrmSyncobjState::into_global()
-fn DrmSyncobjHandler::drm_syncobj_state(&mut self) -> &mut DrmSyncobjState
+fn DrmSyncobjHandler::drm_syncobj_state(&mut self) -> Option<&mut DrmSyncobjState>DrmTimeline constructor now accepts OwnedFd:
-fn DrmTimeline::new(device: &DrmDeviceFd, fd: BorrowedFd<'_>) -> io::Result<Self>
+fn DrmTimeline::new(device: &DrmDeviceFd, fd: OwnedFd) -> io::Result<Self>DrmSyncPoint::eventfd now returns Arc<OwnedFd>:
-fn DrmSyncPoint::eventfd(&self) -> io::Result<OwnedFd>
+fn DrmSyncPoint::eventfd(&self) -> io::Result<Arc<OwnedFd>>GbmFramebufferExporter constructor now accepts import_node,
it will be used to filter DMA-BUFs to only those originating from a specific device before considering them for direct scanout.
If import_node is None direct-scanout of client-buffers won't be used.
-fn GbmFramebufferExporter::new(gbm: Device<A>) -> Self
+fn GbmFramebufferExporter::new(gbm: Device<A>, import_node: Option<DrmNode>) -> Self/// Returns a weak reference to the underlying device
fn DrmDeviceFd::downgrade(&self) -> WeakDrmDeviceFd;
/// Construct an empty Weak reference, that will never upgrade successfully
fn WeakDrmDeviceFd::new() -> Self;
/// Try to upgrade to a strong reference
fn WeakDrmDeviceFd::upgrade(&self) -> Option<DrmDeviceFd>;/// Set the modifiers state.
fn KeyboardHandle::set_modifier_state(&self, mods_state: ModifiersState) -> u32;
/// Serialize modifier state back to be sent to xkb.
fn ModifiersState::serialize_back(&self, state: &xkb::State) -> SerializedMods;/// Get the `zwp_xwayland_keyboard_grab_v1` object that created the grab
fn XWaylandKeyboardGrab::grab(&self) -> &ZwpXwaylandKeyboardGrabV1;
/// Grab is now cloneable
impl Clone for XWaylandKeyboardGrab;/// Returns the hints for the underlying X11 window
fn X11Surface::hints(&self) -> Option<x11rb::properties::WmHints>;
/// Get the client PID associated with the X11 window.
fn X11Surface::get_client_pid(&self) -> Result<u32, Box<dyn Error>>;/// Destroys the state and returns the `GlobalId` for compositors to disable/destroy.
fn DrmSyncobjState::into_global(self) -> GlobalId;
/// Sets a new `import_device` to import the syncobj fds and wait on them.
fn DrmSyncobjState::update_device(&mut self, import_device: DrmDeviceFd);XdgToplevelTag protocol is now available in smithay::wayland::xdg_toplevel_tag module.
CursorShape is now updated to version 2
RenderContext::draw callback now accepts a mutable reference
-fn smithay::backend::renderer::element::texture::RenderContext::draw(&mut self, f: impl FnOnce(&T))
+fn smithay::backend::renderer::element::texture::RenderContext::draw(&mut self, f: impl FnOnce(&mut T))Framebuffer now requires Texture implementation
type smithay::backend::renderer::RendererSuper::Framebuffer: smithay::backend::renderer::TextureOutput::client_outputs no longer returns a Vec
-fn smithay::output::Output::client_outputs(&self, client: &Client) -> Vec<WlOutput>;
+fn smithay::output::Output::client_outputs(&self, client: &Client) -> impl Iterator<Item = WlOutput>;DamageBag/DamageSnapshot damage getters got renamed
-fn smithay::backend::renderer::utils::DamageBag::damage(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
+fn smithay::backend::renderer::utils::DamageBag::raw(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
-fn smithay::backend::renderer::utils::DamageSnapshot::damage(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>
+fn smithay::backend::renderer::utils::DamageSnapshot::raw(&self) -> impl Iterator<Item = impl Iterator<Item = &Rectangle>>RendererSurfaceState::damage now returns a DamageSnapshot
-fn smithay::backend::renderer::utils::RendererSurfaceState::damage(&self) -> impl core::iter::traits::iterator::Iterator<Item = impl core::iter::traits::iterator::Iterator<Item = &smithay::utils::Rectangle<i32, smithay::utils::Buffer>>>
+fn smithay::backend::renderer::utils::RendererSurfaceState::damage(&self) -> smithay::backend::renderer::utils::DamageSnapshot<i32, smithay::utils::Buffer>Client scale can now be fractional
-fn smithay::wayland::compositor::CompositorClientState::client_scale(&self) -> u32
+fn smithay::wayland::compositor::CompositorClientState::client_scale(&self) -> f64
-fn smithay::wayland::compositor::CompositorClientState::set_client_scale(&self, new_scale: u32)
+fn smithay::wayland::compositor::CompositorClientState::set_client_scale(&self, new_scale: f64)Raw renderer_id got replaced with new smithay::backend::renderer::ContextId newtype
-fn smithay::backend::renderer::gles::GlesFrame::id(&self) -> usize;
+fn smithay::backend::renderer::gles::GlesFrame::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::gles::GlesRenderer::id(&self) -> usize;
+fn smithay::backend::renderer::gles::GlesRenderer::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::glow::GlowFrame::id(&self) -> usize;
+fn smithay::backend::renderer::glow::GlowFrame::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::glow::GlowRenderer::id(&self) -> usize;
+fn smithay::backend::renderer::glow::GlowRenderer::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::multigpu::MultiFrame::id(&self) -> usize;
+fn smithay::backend::renderer::multigpu::MultiFrame::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::multigpu::MultiRenderer::id(&self) -> usize;
+fn smithay::backend::renderer::multigpu::MultiRenderer::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::pixman::PixmanFrame::id(&self) -> usize;
+fn smithay::backend::renderer::pixman::PixmanFrame::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::pixman::PixmanRenderer::id(&self) -> usize;
+fn smithay::backend::renderer::pixman::PixmanRenderer::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::test::DummyFrame::id(&self) -> usize;
+fn smithay::backend::renderer::test::DummyFrame::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::test::DummyRenderer::id(&self) -> usize;
+fn smithay::backend::renderer::test::DummyRenderer::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::Frame::id(&self) -> usize;
+fn smithay::backend::renderer::Frame::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::Renderer::id(&self) -> usize;
+fn smithay::backend::renderer::Renderer::context_id(&self) -> ContextId;
-fn smithay::backend::renderer::element::texture::TextureRenderElement::from_static_texture(id: Id, renderer_id: usize, ...) -> Self;
+fn smithay::backend::renderer::element::texture::TextureRenderElement::from_static_texture(id: Id, context_id: ContextId, ...) -> Self;
-fn smithay::backend::renderer::element::texture::TextureRenderElement::from_texture_with_damage(id: Id, renderer_id: usize, ...) -> Self;
+fn smithay::backend::renderer::element::texture::TextureRenderElement::from_texture_with_damage(id: Id, context_id: ContextId, ...) -> Self;
-fn smithay::backend::renderer::utils::RendererSurfaceState::texture<R>(&self, id: usize) -> Option<&TextureId>;
+fn smithay::backend::renderer::utils::RendererSurfaceState::texture<R>(&self, id: &ContextId) -> Option<&TextureId>;CursorShapeDeviceUserData now has an additional generic argument
-struct smithay::wayland::cursor_shape::CursorShapeDeviceUserData;
+struct smithay::wayland::cursor_shape::CursorShapeDeviceUserData<D: SeatHandler>;The explicit frame buffers got introduced, but for the sake of my sanity those changes are not described here, you can look at: https://github.com/Smithay/smithay/commit/df08c6f29eb6ebfa2fce6fc374590483bcbaf21a
It is now possible to check if the OpenGL context is shared with another.
fn smithay::backend::egl::context::EGLContext::is_shared();It is now possible to check that there are no other references to the underlying GL texture.
fn smithay::backend::renderer::gles::GlesTexture::is_unique_reference();There is a new gles capability for support of fencing and exporting to EGL
smithay::backend::renderer::gles::Capability::ExportFence;There is a new BlitFrame trait for frames that support blitting contents from/to the current framebuffer to/from another.
trait smithay::backend::renderer::BlitFrame;
impl BlitFrame for smithay::backend::renderer::gles::GlesFrame;
impl BlitFrame for smithay::backend::renderer::glow::GlowFrame;
impl BlitFrame for smithay::backend::renderer::multigpu::MultiFrame;It is now possible to iterate over all known tokens and their associated data
fn smithay::wayland::xdg_activation::XdgActivationState::tokens() -> impl Iterator<Item = (&XdgActivationToken, &XdgActivationTokenData)>;There are new errors for missing DRM crtc/connector/plane mapping
smithay::backend::drm::DrmError::{UnknownConnector, UnknownCrtc, UnknownPlane};Texture has a few new implementations
impl Texture for smithay::backend::renderer::gles::GlesTarget;
impl Texture for smithay::backend::renderer::multigpu:MultiFramebuffer;
impl Texture for smithay::backend::renderer::pixman::PixmanTarget;
impl Texture for smithay::backend::renderer::test::DummyFramebufferIt is now possible to access WlKeyboard/WlPointer instances
fn smithay::input::keyboard::KeyboardHandle::client_keyboards(&self, client: &Client) -> impl Iterator<Item = WlKeyboard>;
fn smithay::input::pointer::PointerHandle::client_pointers(&self, client: &:Client) -> impl Iterator<Item = WlPointer>;New APIs for X11 randr output management
enum smithay::xwayland::xwm::PrimaryOutputError { OutputUnknown, X11Error(x11rb::errors::ReplyError) };
impl From<x11rb::errors::ConnectionError> for smithay::xwayland::xwm::PrimaryOutputError;
fn smithay::xwayland::xwm::PrimaryOutputError::from(value: x11rb::errors::ConnectionError) -> Self;
fn smithay::xwayland::xwm::X11Wm::get_randr_primary_output(&self) -> Result<Option<String>, x11rb::errors::ReplyError>;
fn smithay::xwayland::xwm::X11Wm::set_randr_primary_output(&mut self, output: Option<&smithay::output::Output>) -> Result<(), smithay::xwayland::xwm::PrimaryOutputError>;
fn smithay::xwayland::xwm::XwmHandler::randr_primary_output_change(&mut self, xwm: smithay::xwayland::xwm::XwmId, output_name: Option<String>);It is now possible to get the DrmNode of the device the buffer was allocated on
fn smithay::backend::allocator::gbm::GbmBuffer::device_node(&self) -> Option<drm::node::DrmNode>;It is now possible to create a GbmBuffer from an existing BufferObject explicitly defining the device node
fn smithay::backend::allocator::gbm::GbmBuffer::from_bo_with_node(bo: gbm::buffer_object::BufferObject<()>, implicit: bool, drm_node: core::option::Option<drm::node::DrmNode>) -> Self;It is now possible to access the Allocator of this output manager
fn smithay::backend::drm::output::DrmOutputManager::allocator(&self) -> &Allocator;Is is now possible to check if EGLDevice is backed by actual device node or is it a software device.
fn smithay::backend::egl::EGLDevice::is_software(&self) -> boolThis adds a way to query next deadline of a commit timing barrier. Allows a compositor to schedule re-evaluating commit timers without busy looping.
fn smithay::wayland::commit_timing::CommitTimerBarrierState::next_deadline(&self) -> Option<smithay::wayland::commit_timing::Timestamp>;Support for casting Timestamp back to Time
This might be useful to compare the next deadline with a monotonic time
from the presentation clock
impl From<smithay::wayland::commit_timing::Timestamp> for smithay::utils::Time;Support for creating a weak reference to a Seat
fn smithay::input::Seat::downgrade(&self) -> smithay::input::WeakSeat;
fn smithay::input::WeakSeat::is_alive(&self) -> bool;
pub fn smithay::input::WeakSeat::upgrade(&self) -> Option<smithay::input::Seat>;Items either removed or deprecated from the public API
/// Use Clone instead
impl Copy for smithay::utils::HookId;
/// Use `from_extremities` instead
fn smithay::utils::Rectangle::from_extemities(topleft, bottomright) -> Self;Items added to the public API
/// Replaces deprecated `from_extemities`
fn smithay::utils::Rectangle::from_extremities(topleft, bottomright) -> Self;
/// Access the active text-input instance for the currently focused surface.
fn smithay::wayland::text_input::TextInputHandle::with_active_text_input(&self, f);
/// Just a new protocol
mod smithay::wayland::selection::ext_data_control;Items changed in the public API
# create_external_token now accepts `XdgActivationTokenData` instead of `String`
-fn smithay::wayland::xdg_activation::XdgActivationState::create_external_token(&mut self, app_id: impl Into<Option<String>>);
+fn smithay::wayland::xdg_activation::XdgActivationState::create_external_token(&mut self, data: impl Into<Option<XdgActivationTokenData>>);- Introduce ext data control protocol by @PolyMeilex in #1577
- Update idle notify to version 2 by @PolyMeilex in #1618
- Revert "Fix repeated key input issue in Chrome with multiple windows" by @Drakulix in #1647
- text-input: fix active instance tracking by @kchibisov in #1648
- text-input: properly handle double buffered state by @kchibisov in #1649
- clock: Fix current monotonic time in millis u32 overflow panic by @YaLTeR in #1645
- xwm: Update override-redirect flag on map request by @Ottatop in #1656
- utils: Rework
HookIdrecycle logic by @Paraworker in #1657 - rename Rectangle::from_extemities to Rectangle::from_extremities by @m4rch3n1ng in #1646
- xdg_activation: Allow passing all data in XdgActivationState::create_external_token by @bbb651 in #1658
wayland-server was updated to 0.30:
- Most of the wayland frontend API is changed to follow the new request dispatching mechanism built around the
Dispatchtrait fromwayland-server - Modules that provide handlers for Wayland globals now provide
DelegateDispatchimplementations, as well as macros to simplify the dispatching from your main state
- Remove
xdg-shell-unstable-v6backwards compatibility XdgPositionerStatemoved toXdgPopupStateand added toXdgRequest::NewPopupPopupSurface::send_configurenow checks the protocol version and returns anResultKeyboardHandle::inputfilter closure now receives aKeysymHandleinstead of aKeysymand returns aFilterResult.PointerButtonEvent::buttonnow returns anOption<MouseButton>.MouseButtonis now non-exhaustive.- Remove
Otherand addForwardandBackvariants toMouseButton. Use the newPointerButtonEvent::button_codein place ofOther. GrabStartDatahas been renamed toPointerGrabStartData- The
slotmethod on touch events no longer returns anOptionand multi-touch capability is thus opaque to the compositor wayland::output::Outputnow is created separately from it'sGlobalas reflected by [Output::new] and the new [`Output::create_global] method.PointerHandleno longer sends an implicit motion event when a grab is set,timehas been replaced by an explicitfocusparameter in [PointerHandle::set_grab]ToplevelSurface::send_configure/PopupSurface::send_configure/LayerSurface::send_configurenow always send a configure event regardless of changes and return the serial of the configure event.send_pending_configurecan be used to only send a configure event on pending changes.
- Rename
WinitInputBackedtoWinitEventLoop. - Rename
WinitInputErrortoWinitError; WinitInputBackendno longer implementsInputBackend. Input events are now received from theWinitEvent::Inputvariant.- All winit backend internal event types now use
WinitInputas the backend type. WinitEventLoop::dispatch_new_eventsis now used to receive someWinitEvents.- Added
TabletToolType::Unknownas an option for tablet events render_texturewas removed fromFrame, userender_texture_atorrender_texture_from_toinstead or useGles2Renderer::render_textureas a direct replacement.- Remove
InputBackend::dispatch_new_events, turningInputBackendinto a definition of backend event types. Future input backends should be acalloop::EventSource. - Remove
InputBackend::EventErrorassociated type as it is unneeded sincedispatch_new_eventswas removed. Swapchaindoes not have a generic Userdata-parameter anymore, but utilizesUserDataMapinsteadGbmBufferedSurface::next_buffernow additionally returns the age of the bufferPresentwas merged into theX11SurfaceX11Surface::buffernow additionally returns the age of the bufferX11Surfacenow has an explicitsubmitfunctionX11Surfaceis now multi-window capable.Renderer::clearnow expects a second argument to optionally only clear parts of the buffer/surfaceTransform::transform_sizenow takes aSizeinstead of twou32Gles2Renderernow automatically flips therenderresult to account for OpenGLs coordinate systemFrame::clear,Frame::render_texture_atandFrame::render_texture_from_tonow have an additional damage argumentEGLNativeSurfaceimplementations overridingswap_buffersnow receive and additionaldamageattribute to be used witheglSwapBuffersWithDamageEXTif desiredEGLSurface::swap_buffersnow accepts an optionaldamageparameterWinitGraphicsBackenddoes no longer provide arender-method and exposes itsRendererdirectly instead including new functionsbindandsubmitto handle swapping buffers.ImportShmwas renamed toImportMemImportMemandImportDmawere split and do now have accompanying traitsImportMemWlandImportDmaWlto import wayland buffers.- Added
EGLSurface::get_size EGLDisplay::get_extensionswas renamed toextensionsand now returns a&[String].- Added gesture input events, which are supported with the libinput backend.
xdg_activation_v1supportwlr-layer-shell-unstable-v1support- Added public api constants for the roles of
wl_shell_surface,zxdg_toplevelandxdg_toplevel. See theshell::legacyandshell::xdgmodules for these constants. - Whether a surface is toplevel equivalent can be determined with the new function
shell::is_toplevel_equivalent. - Setting the parent of a toplevel surface is now possible with the
xdg::ToplevelSurface::set_parentfunction. - Add support for the zxdg-foreign-v2 protocol.
- Support for
xdg_wm_baseprotocol version 3 - Added the option to initialize the dmabuf global with a client filter
wayland::output::Outputnow has user data attached to it and more functions to query its properties- Added a
KeyboardGrabsimilar to the existingPointerGrab wayland::output::Outputnow has acurrent_scalemethod to quickly retrieve its set scale.wayland::shell::wlr_layer::KeyboardInteractivitynow implementsPartialEqandEq.- Added
TouchHandlefor Wayland client touch support (seeSeat::get_touch) wayland::output::Scalewas introduced to handle fractional scale values better- Support for
wl_outputglobal version 4 - Support for
wl_seatglobal version 7 - Support for
wl_compositorglobal version 5 - Support for the
wp_viewporterprotocol - Support for the
zwp_input_method_v2protocol - Support for the
zwp_text_input_v3protocol
- New
x11backend to run the compositor as an X11 client. Enabled through thebackend_x11feature. x11rbevent source integration used in anvil's XWayland implementation is now part of smithay atutils::x11rb. Enabled through thex11rb_event_sourcefeature.KeyState,MouseButton,ButtonStateandAxisinbackend::inputnow deriveHash.- New
DrmNodetype in drm backend. This is primarily for use a backend which needs to run as client inside another session. - The button code for a
PointerButtonEventmay now be obtained usingPointerButtonEvent::button_code. Renderernow allows texture filtering methods to be set.backend::rendererhas a newutils-module that can take care of client buffer management for you.EGLSurface::buffer_agecan be used to query the surface buffer age.GbmBufferedSurface::reset_bufferscan now be used to reset underlying buffers.- Added new
Offscreentrait to create offscreen surfaces forRenderers - Added functions to
ImportMemto upload bitmaps from memory - Added
ExportDmatrait to export framebuffers and textures into dmabufs - Added
ExportMemtrait to copy framebuffers and textures into memory - Added
multigpu-module to the renderer, which makes handling multi-gpu setups easier! - Added
backend::renderer::utils::import_surface_treeto be able to import buffers before rendering - Added
EGLContext::displayto allow getting the underlying display of some context. - Make
EGLContext::dmabuf_render_formatsandEGLContext::dmabuf_texture_formatsalso accessible fromEGLDisplay.
- New
desktopmodule to handle window placement, tracks popups, layer surface and various rendering helpers including automatic damage-tracking! (+so much more)
Rectanglecan now also be converted from f64 to i32 variantsRectangle::contains_rectcan be used to check if a rectangle is contained within anotherCoordinateis now part of the public api, so it can be used for coordinate agnositic functions outside of the utils module or even out-of-tree
Multicache::has()now correctly does what is expected of itxdg_shellhad an issue where it was possible that configured state gets overwritten before it was acked/committed.wl_keyboardrewind thekeymapfile before passing it to the clientwl_shmproperly validates parameters when creating awl_buffer.ServerDnDGrabandDnDGrabnow correctly send data deviceleaveevent on button release- Client are now allowed to reassign the same role to a surface
xdg_outputnow applies the output transforms to the reported logical size
- EGLBufferReader now checks if buffers are alive before using them.
- LibSeat no longer panics on seat disable event.
- X11 backend will report an error when trying to present a dmabuf fails.
- Anvil now implements the x11 backend in smithay. Run by passing
--x11into the arguments when launching. - Passing
ANVIL_MUTEX_LOGin environment variables now uses the slowerMutexlogging drain. - Only toplevel surfaces now get implicit keyboard focus
- Fix popup drawing for fullscreen windows
Large parts of Smithay were changed with numerous API changes. It is thus recommended to approach version 0.3 as if it was a new crate altogether compared to 0.2.
The most notable changes are:
- Deep refactor of the graphics backends around a workflows centered on allocating graphics buffers, and a Gles2-based renderer abstraction is provided.
- Support for DRM atomic modesetting as well as client-provided DMABUF
- Most backends are now
calloopevent sources generating events. The recommended organization for your smithay-based compositor is thus to centralize most of your logic on a global state struct, and delegate event handling to it via the shared data mechanism ofcalloop. Most of the callbacks you provide to Smithay are given mutable access to this shared data. - The
wayland::compositorhandling logic now automatically handles state tracking and delayed commit for wayland surfaces.
Many thanks to the new contributors to Smithay, who contributed the following:
- Support for
libseatas a session backend, by @PolyMeilex - Support for graphics tablets via the
tabletprotocol extension, by @PolyMeilex - Support for running Smithay on
aarch64architectures, by @cmeissl - A rework of the
xdg-shellhandlers to better fit the protocol logic and correctly track configure events, by @cmeissl - Basic Xwayland support, by @psychon
- [Breaking] Upgrade to wayland-rs 0.21
- [Breaking] Moving the public dependencies to a
reexportsmodule - Migrate the codebase to Rust 2018
- [Breaking] WinitBackend: Upgrade to winit 0.18
- [Breaking] Global refactor of the DRM & Session backends
- [Breaking] Restructuration of the backends around the
calloopevent-loop
- Basic XWayland support
- Data device & Drag'n'Drop support
- Custom client pointers support
- Low-level handling routines for several wayland globals:
wayland::shmhandleswl_shmwayland::compositorhandleswl_compositorandwl_subcompositorwayland::shellhandleswl_shellandxdg_shellwayland::seathandleswl_seatwayland::outputhandleswl_output
- Winit backend (EGL context & input)
- DRM backend
- libinput backend
- glium integration