Skip to content

Conversation

@ShadowApex
Copy link
Collaborator

@ShadowApex ShadowApex commented Jun 29, 2025

This change adds a new "Application Lifecycle Hooks" feature that can allow library plugins to hook into different parts of the application launch process, allowing plugins to execute code before or after an application launches. This can be useful for things like pre-compiling shaders, starting a service, downloading dependencies, etc.

These lifecycle hooks also have a mechanism to emit text or progress that can be displayed when a game is launching:
lifecycle

Plugin developers can add app lifecycle hooks by implementing the get_app_lifecycle_hooks() function in their library plugin that returns a list of AppLifecycleHook objects that will be executed before or after an app launches.

Additionally, this change includes updates to the LaunchManager to use the modern way (gamescope v3.16.14+) of focusing apps, which now uses an array of focused apps instead of a single value and also includes some extra fixes such as:

  • Kill applications asyncronously to prevent holding up the main thread
  • Ignore considering windows that are very small (e.g. 1x1 pixel windows, 20x20 pixel windows, etc.)
  • Add create, spawn, and start methods to RunningApp to allow delaying the start of an application.
  • Improved logic in RunningApp for detecting when Steam apps close.
  • Use the OGUI_ID environment variable to identify all processes that belong to a particular RunningApp.

@hphilm
Copy link
Contributor

hphilm commented Jul 20, 2025

Does this go hand in hand with: ShadowBlip/OpenGamepadUI-steam#16

@ShadowApex
Copy link
Collaborator Author

Yes, it is meant to compliment the work in that branch.

@ShadowApex ShadowApex force-pushed the shadowapex/better-launching branch 3 times, most recently from 1b6249f to b08bc8e Compare August 5, 2025 02:57
@ShadowApex ShadowApex force-pushed the shadowapex/better-launching branch 2 times, most recently from 5a071a2 to db2e3aa Compare August 15, 2025 06:22
@ShadowApex ShadowApex force-pushed the shadowapex/better-launching branch from db2e3aa to fa9bcdb Compare August 15, 2025 06:54
@ShadowApex ShadowApex marked this pull request as ready for review August 15, 2025 06:55
@ShadowApex ShadowApex requested a review from pastaq August 15, 2025 06:55
Copy link
Collaborator

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

DO better with code comments...

@ShadowApex ShadowApex merged commit 452e217 into main Sep 22, 2025
2 checks passed
@ShadowApex ShadowApex deleted the shadowapex/better-launching branch September 22, 2025 01:07
@github-actions
Copy link

🎉 This PR is included in version 0.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants