Sweets
Running

Protocol Support

Activation, foreign toplevels, pointer constraints, input methods, and virtual input device protocols.

Sweets implements a range of Wayland protocols for activation, cross-client window relationships, pointer control, and input methods. This page covers each one and how Sweets handles it.

XDG Activation

Sweets implements xdg-activation-v1. Launchers, portals, notifications, and applications can request activation for a mapped XDG toplevel.

If the surface belongs to a managed window and the session is unlocked, Sweets switches to that window's workspace and focuses it. Requests for unmapped, unmanaged, or non-XDG surfaces are ignored.

XDG Foreign

Sweets implements xdg-foreign v1 and v2. Applications and portals can export a toplevel from one client and import it from another. This lets helper windows, dialogs, and embedded flows establish parent/child relationships across processes.

# smoke test
wayland-info | rg 'zxdg_(exporter|importer)_v[12]'

Relative Pointer and Pointer Constraints

Sweets implements relative-pointer-v1 and pointer-constraints-v1. Games, virtual machines, remote desktop clients, and 3D tools can request relative pointer events and lock or confine the pointer while their surface has focus.

Sweets activates constraints for the pointer-focused root surface on seat0.

  • Locked pointers keep the compositor cursor stationary while relative motion continues to the client.
  • Confined pointers clamp cursor motion to the client's constraint region.

Compositor-owned move/resize grabs do not send relative pointer motion.

Text Input and Input Methods

Sweets implements text-input-v3 and input-method-v2, the pair used by frameworks such as Fcitx5 and IBus for preedit text, candidate windows, and surrounding-text updates.

Normal XDG windows and keyboard-interactive layer-shell surfaces can receive text-input focus. One input method can bind to seat0. IME keyboard grabs work after compositor keybindings, and popup surfaces are placed near the client's cursor rectangle. Session lock clears IME focus so lock surfaces receive raw keyboard input.

# smoke test
fcitx5 -d
WAYLAND_DISPLAY=$WAYLAND_DISPLAY foot

Then focus a text field and switch to an input method with preedit UI.

Virtual Keyboards

Sweets implements virtual-keyboard-v1, so on-screen keyboards, accessibility tools, and some input-method setups can inject keyboard events into seat0.

Virtual keyboards use the same routing as physical ones: compositor keybindings first, then shortcut inhibition and IME policy, then focused-client delivery. Session lock takes priority.

# smoke test
wayland-info | rg zwp_virtual_keyboard_manager_v1

For an interactive test, use an on-screen keyboard such as wvkbd.

Virtual Pointers

Sweets implements virtual-pointer-v1, so remote-control, accessibility, and automation tools can inject motion, buttons, and scroll into seat0.

Virtual pointers use the normal cursor path. Output activation, focus-follows-mouse, pointer constraints, interactive move/resize, and click focus all behave as with physical pointers.

# smoke test
wayland-info | rg zwlr_virtual_pointer_manager_v1

Presentation Time

Sweets implements wp_presentation_time. Clients receive accurate presentation feedback: the exact time a frame hit the screen, the refresh cycle, and whether it used zero copy or hardware clocks. Media players and games use this for frame pacing and A/V sync.

There is nothing to configure. The scene graph emits feedback for every surface it presents, tracking each output's real refresh.

# smoke test
wayland-info | rg wp_presentation

Foreign Toplevel Listing

Sweets publishes the list of open windows so taskbars, docks, and switchers can show and act on them. It implements both the older zwlr_foreign_toplevel_management_v1 and the modern ext-foreign-toplevel-list side by side.

Each XDG toplevel appears as a handle on both, created on map and removed on unmap, with title and app-id kept in sync.

  • The zwlr manager also carries state — focused, fullscreen, maximized, per-output — and accepts activate, close, fullscreen, and maximize requests.
  • ext-foreign-toplevel-list is listing-only by design, mirroring just title and app-id.
# smoke test
wayland-info | rg 'foreign_toplevel'

Toplevel Icon

Sweets implements xdg-toplevel-icon-v1. A client can give an individual window its own icon — a themed name or pixel buffers — overriding the default derived from app-id. This helps when one app shows several windows wanting distinct icons.

Sweets draws no title bars, so it does not paint the icon. It records the per-window icon name and exposes it through the IPC views query as icon="<name>", so an IPC-driven bar can render it.

Buffer-only icons are accepted but not surfaced, since text IPC cannot carry raw pixels. The compositor advertises preferred icon sizes from 16 to 64 px.

# smoke test
wayland-info | rg xdg_toplevel_icon_manager_v1

Server-Side Decorations

Sweets draws window borders itself, so it asks clients not to draw title bars. It implements both xdg-decoration and KDE's obsolete org_kde_kwin_server_decoration, for clients that only speak the old one.

Both default to server-side. For xdg-decoration Sweets forces server-side mode on every toplevel and re-asserts it if a client renegotiates. For KDE server-decoration it advertises a server-side default mode, the signal those clients read to drop their own decorations.

# smoke test
wayland-info | rg 'decoration'

Single-Pixel Buffer

Sweets implements single-pixel-buffer-v1. Clients can create a 1×1 solid-color buffer without allocating shared memory. Portals and some toolkits use this for cheap solid fills and placeholder surfaces. Nothing to configure.

# smoke test
wayland-info | rg wp_single_pixel_buffer_manager_v1

Alpha Modifier

Sweets implements alpha-modifier-v1. A client can ask for a constant opacity on one of its surfaces instead of pre-multiplying alpha into every frame. The scene graph applies the factor automatically.

# smoke test
wayland-info | rg wp_alpha_modifier_v1

Pointer Gestures

Sweets implements pointer-gestures-v1. Multi-finger touchpad gestures — swipe, pinch, and hold — are forwarded to the application under the pointer, so native clients get browser swipe-back, GTK pinch-zoom, and similar.

Sweets relays every gesture begin, update, and end from the seat cursor straight to the pointer-focused client. It does not bind gestures to compositor actions, so nothing is intercepted.

Gesture events only originate from a physical multi-finger touchpad via libinput, though the global is always advertised.

# smoke test
wayland-info | rg zwp_pointer_gestures_v1

Explicit Synchronization

Sweets implements linux-drm-syncobj-v1. Instead of implicit, driver-guessed fences, clients hand the compositor explicit acquire/release timeline points, so the GPU knows exactly when a buffer is ready and free to reuse. This removes a class of flicker and stutter, most visibly on NVIDIA.

The protocol is advertised only when the renderer and backend support DRM synchronization timelines and a DRM device is available — in practice, DRM/KMS on a capable GPU. Without that support the global is not exposed and clients fall back to implicit sync.

Turn it off with the explicit_sync setting. Keep it on for NVIDIA.

Intel Arc (DG2) on i915 glitches under explicit sync — windows flash and stretch on resize, and the log floods with … cannot be scanned out. Set explicit_sync = false on those systems. AMD and NVIDIA are unaffected.

# smoke test (DRM/KMS session)
wayland-info | rg wp_linux_drm_syncobj_manager_v1

Tearing Control

Sweets implements tearing-control-v1. A client, typically a game, can hint that a surface should be presented immediately rather than waiting for vsync — trading a possible seam for lower latency.

The hint is honored only when all of these hold:

  • The global allow_tearing switch is on.
  • The requesting window is fullscreen and driving the output.
  • The backend accepts a tearing page-flip for that frame.

A fullscreen surface tagged a game through content-type-v1 counts as requesting tearing too, so games that never speak tearing-control-v1 still get the low-latency path. Any other frame falls back to a normal vsynced flip. Tearing requires the DRM/KMS backend.

# smoke test
wayland-info | rg wp_tearing_control_manager_v1

Content Type

Sweets implements content-type-v1. A client can tag a surface as photo, video, or game so the compositor can adjust presentation.

A fullscreen surface tagged game is treated as wanting low latency. With allow_tearing on, it triggers a tearing page-flip even without an explicit tearing-control-v1 hint. Other content types are advertised but do not currently change presentation.

# smoke test
wayland-info | rg wp_content_type_manager_v1

Keyboard Shortcut Inhibition

Sweets implements keyboard-shortcuts-inhibit-v1. Virtual machines, remote desktop clients, and some games can ask Sweets to pass shortcuts through while their surface has focus.

Sweets honors inhibitors for the focused surface on seat0. While active, it skips compositor keybindings and forwards key events to the client. Session lock still takes priority.

On this page