blursync

package
v0.2.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package blursync keeps a surface's compositor blur in step with what its widget tree asks for: the blur region on the wire when the compositor offers blur, css.BlurUnavailable on the root when it does not. Windows, layer surfaces and popups all go through it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Surface

type Surface interface {
	// BlurAvailable reports whether the compositor blurs behind
	// surfaces at all right now.
	BlurAvailable() bool
	// SetBlurRegion asks the compositor to blur behind rects
	// (surface-local, logical pixels; none removes the effect), applying
	// with the next commit.
	SetBlurRegion(rects []render.Rect) error
}

Surface is the wire half of a blurred surface.

type Sync

type Sync struct {
	// contains filtered or unexported fields
}

Sync is one surface's blur state. Like the opaque region it is surface state, re-sent only when the shape changes. The zero value has sent nothing.

func (*Sync) Active

func (s *Sync) Active() bool

Active reports whether the compositor blurs behind the surface: a region is out and non-empty.

func (*Sync) Update

func (s *Sync) Update(surf Surface, want bool, root widget.Widget, shape func() []render.Rect)

Update publishes shape's result while want holds and the compositor offers blur, nothing otherwise. While blur is wanted but not in effect root carries css.BlurUnavailable, so its style can turn opaque rather than show the unblurred desktop. Call it before the frame's damage drain, so a class flip repaints that very frame, and before the commit the region should ride on.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL