dialogsurface

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 7 Imported by: 1 module, 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 dialogsurface maps a portal dialog the way its request asks: transient for the app window that asked, when the request names it by an xdg-foreign handle the compositor can import, so the dialog is modal to that window only and the rest of the desktop stays usable; otherwise as an overlay over an output, which holds the keyboard while it is modal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParentHandle

func ParentHandle(parentWindow string) (string, bool)

ParentHandle is the xdg-foreign handle a request's parent_window names, false when it names none a Wayland dialog can be parented to.

Types

type Spec

type Spec struct {
	// Caller is the request: its parent window and modality.
	Caller portaldialogs.Caller
	// Title names the dialog's window.
	Title string
	// Overlay is the dialog as an overlay. A parented dialog takes its
	// Root, its input hooks and its Namespace, as its app id.
	Overlay app.LayerConfig
	// Failed runs when the dialog lost its parent and could not map as
	// an overlay instead: nothing shows it any more, and the host
	// answers the request.
	Failed func()
}

Spec is one dialog to map.

type Window

type Window interface {
	Close()
	SetFocus(widget.Widget) error
	HostSurface() *wl.Surface
}

Window is a mapped dialog, either kind.

func Open

func Open(a *app.Application, s Spec) (Window, error)

Open maps s on a: parented to the caller's window where it can be, else as the overlay. A parent the compositor cannot import (no xdg-foreign importer) falls back silently, any other failure to open with a warning.

Directories

Path Synopsis
Package surfacetest runs a portal dialog host against a real lys-wm, with an app window it can be parented to, and reads back where lys-wm put the dialog.
Package surfacetest runs a portal dialog host against a real lys-wm, with an app window it can be parented to, and reads back where lys-wm put the dialog.
probe command
Command probe maps one app window for surfacetest, in a process of its own as a real app's is, and reports on stdout the handle it is exported as ("handle <h>") and whether it holds the keyboard focus ("keyboard true|false"), each when it changes, until it is killed.
Command probe maps one app window for surfacetest, in a process of its own as a real app's is, and reports on stdout the handle it is exported as ("handle <h>") and whether it holds the keyboard focus ("keyboard true|false"), each when it changes, until it is killed.

Jump to

Keyboard shortcuts

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