Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Add Suspend/Resume callback support #1474

Merged
merged 2 commits into from
Jun 21, 2022

Conversation

leaanthony
Copy link
Member

Added these so that an application developer can choose to do things like teardown/standup network connections on suspend/resume.

@leaanthony leaanthony requested a review from stffabi June 21, 2022 09:28
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 21, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4e451d5
Status: ✅  Deploy successful!
Preview URL: https://af557d89.wails-website.pages.dev
Branch Preview URL: https://feature-windows-suspend-resu.wails-website.pages.dev

View logs

Copy link
Collaborator

@stffabi stffabi left a comment

Choose a reason for hiding this comment

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

LGTM, I've just added a minor comment.

@@ -24,6 +24,8 @@ type Window struct {
isDarkMode bool
isActive bool
hasBeenShown bool
OnSuspend func()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we make OnSuspend and OnResume private?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a great point. I think for now it's ok as Window is an internal struct.

@leaanthony leaanthony merged commit 3819096 into master Jun 21, 2022
@leaanthony leaanthony deleted the feature/windows-suspend-resume branch June 21, 2022 20:37
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.

2 participants