Skip to content

API Reference / @gtkx/runtime / quitApplication

Variable: quitApplication

const quitApplication: (application) => void

Defined in: packages/runtime/dist/lifecycle.d.ts:82

Detaches every window from the application and runs GLib's own shutdown, which emits shutdown, destroys the application implementation and releases the D-Bus registration. Does nothing for an application that is not registered, so a repeated call is a no-op.

GLib's own shutdown is reachable once per application: reaching it marks the application as quitting, which GLib never undoes. An application that has already quit falls back to emitting shutdown, which releases the runtime and leaves the registration for GLib to drop at finalize.

Parameters

application

ApplicationLike

The application to shut down.

Returns

void

Released under the MPL-2.0 License.