# gpui: Add system wake callback \(\#59831\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ee571d3c6991f19caf6f505407d02f3238dfc39e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ee571d3c6991f19caf6f505407d02f3238dfc39e

Requested commit: ee571d3c6991f19caf6f505407d02f3238dfc39e

Commit: ee571d3c6991f19caf6f505407d02f3238dfc39e

Tree: 1dc701c0d30f9e14717265ee96d6f58889b2289f

Author: Agus Zubiaga

Committer: GitHub

## Message

```
gpui: Add system wake callback (#59831)

# Objective

GPUI apps currently don't have a cross-platform way to react when the
system wakes from sleep.

## Solution

Add `Application::on_system_wake`, backed by platform hooks for macOS,
Windows, and Linux. The platform listeners are registered lazily once an
app installs a wake callback.

## Testing

- N/A

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

- [64b8491fc63bcf6c894739e137c333c865e421ca](https://git.cafe/gitcafe/zed/commit/64b8491fc63bcf6c894739e137c333c865e421ca?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ee571d3c6991f19caf6f505407d02f3238dfc39e?format=markdown)
