Skip to content

feat(ui): add IWindowManager.Invoke<T> for framework-thread window actions#22

Merged
nxships merged 1 commit into
mainfrom
feat/window-manager-invoke
Jun 1, 2026
Merged

feat(ui): add IWindowManager.Invoke<T> for framework-thread window actions#22
nxships merged 1 commit into
mainfrom
feat/window-manager-invoke

Conversation

@nxships
Copy link
Copy Markdown
Contributor

@nxships nxships commented Jun 1, 2026

Adds IWindowManager.Invoke<T>(Action<T>) — resolves a registered window and runs the action against it on Dalamud's framework thread (inline when already on it).

Why

Callers that reach into a window from a background thread (e.g. a chat-link handler whose work went async) shouldn't each have to inject IFramework and marshal manually. Centralizing this in the window manager keeps window mutations on the UI thread by construction.

How

WindowManager resolves IFramework from the service provider and wraps action(w) in RunOnFrameworkThread; falls back to a direct call when no framework service is registered (headless hosts). Additive, backwards-compatible.

…tions

Resolves a registered window and runs an action against it on Dalamud's
framework thread (inline when already on it), so callers reaching in from
a background thread (e.g. a chat-link handler whose work went async) don't
have to marshal themselves. WindowManager pulls IFramework from the service
provider and falls back to a direct call when none is registered.
@nxships nxships enabled auto-merge (squash) June 1, 2026 02:09
@nxships nxships merged commit 1bd0ab4 into main Jun 1, 2026
2 checks passed
@nxships nxships deleted the feat/window-manager-invoke branch June 1, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant