public sealed class Gtk4PortalWindowOwner : IPortalWindowOwner, INativePickerOwner Exports XDG portal parents from a verified GTK 4 window owner.
Remarks
The supplied owner must dispatch GTK 4 window handles. This class keeps every GTK and GDK operation inside that owner's callback, so callers never observe a raw native handle.
Constructors
Gtk4PortalWindowOwner
public Gtk4PortalWindowOwner(INativePickerOwner owner) Exports XDG portal parents from a verified GTK 4 window owner.
Remarks
The supplied owner must dispatch GTK 4 window handles. This class keeps every GTK and GDK operation inside that owner's callback, so callers never observe a raw native handle.
Properties
Generation
public Guid Generation { get; } The verified presentation generation, shared with its lifetime.
Documentation from INativePickerOwner.Generation.
IsAvailable
public bool IsAvailable { get; } Whether the provider can currently show dialogs.
Documentation from INativePickerOwner.IsAvailable.
Methods
ExportParentAsync
public ValueTask<PortalParentLease> ExportParentAsync(CancellationToken cancellationToken = default) Exports a parent valid until the returned lease is disposed.
Documentation from IPortalWindowOwner.ExportParentAsync.
InvokeAsync
public ValueTask InvokeAsync(Action<nint> action, CancellationToken cancellationToken = default) Revalidates owner identity and dispatches on its native thread. The handle cannot escape the callback.
Documentation from INativePickerOwner.InvokeAsync.
PresentAsync
public ValueTask PresentAsync(DesktopActivationContext? context = null, CancellationToken cancellationToken = default) Requests presentation on this verified owner using the desktop's activation context.
Remarks
The compositor decides whether to grant focus. Never sets process-wide environment variables.