Skip to content

Avoid sleeping on windows if connected #3498

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

ann0see
Copy link
Member

@ann0see ann0see commented May 5, 2025

Short description of changes

Avoids Windows to go into sleep mode if the client is connected to a server

CHANGELOG: Windows: Avoid screensaver or sleeping if connected to a server

Context: Fixes an issue?

Related to: #834

Does this change need documentation? What needs to be documented and how?

No

Status of this Pull Request

Ready for review. A pre-build was tested on Win 11 and it worked as expected: If a connection to the server stands, the device does not sleep. Once it is disconnected, it will sleep.

What is missing until this pull request can be merged?

Testing on another system.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@ann0see
Copy link
Member Author

ann0see commented May 5, 2025

Depends on #3499 to run the CI

@ann0see ann0see added this to the Release 3.12.0 milestone May 5, 2025
@ann0see ann0see added this to Tracking May 5, 2025
@github-project-automation github-project-automation bot moved this to Triage in Tracking May 5, 2025
@ann0see ann0see moved this from Triage to Waiting on Team in Tracking May 5, 2025
@ann0see ann0see self-assigned this May 5, 2025
@ann0see ann0see added the Windows Windows runtime issue label May 5, 2025
@ann0see ann0see requested review from softins and pljones May 5, 2025 20:26
@ann0see
Copy link
Member Author

ann0see commented May 5, 2025

Linux might be the next step (in another PR).

Copy link
Member

@softins softins left a comment

Choose a reason for hiding this comment

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

I haven't tested it myself, but the changes look sensible, and appear to comply with the Win32 API docs.

On a related note, I have noticed for a long time that Jamulus on my Mac prevents display dimming or sleeping all the time it is running, and I have thought that it would be better if it did so only while connected, similar to this PR. Maybe another PR could change the behaviour on Mac to match that of this PR?

Copy link
Collaborator

@pljones pljones left a comment

Choose a reason for hiding this comment

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

I can't comment on the change -- but the build doesn't seem to be running properly.

@ann0see ann0see force-pushed the autobuild/addWindowsSleep branch from 261e791 to 881b416 Compare May 6, 2025 17:32
@ann0see
Copy link
Member Author

ann0see commented May 6, 2025

It should be fixed now

@ann0see
Copy link
Member Author

ann0see commented May 6, 2025

Maybe another PR could change the behaviour on Mac to match that of this PR?

Probably. I suppose it would be related to the objective c code we include on macOS builds

@ann0see ann0see merged commit 703da09 into jamulussoftware:main May 7, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Team to Done in Tracking May 7, 2025
@ann0see ann0see deleted the autobuild/addWindowsSleep branch May 7, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Windows runtime issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants