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

Support disabling the screen blank/lock #4538

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

andydotxyz
Copy link
Member

API proposed and implementation for iOS and Android.
Windows/macOS/Linux X11&Wayland could be another PR?

Fixes #4534

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.
  • Public APIs match existing style and have Since: line.

Support is in for iOS and Android.
For some reason Android code doesn't always work !?
@andydotxyz andydotxyz changed the base branch from master to develop January 12, 2024 20:56
@coveralls
Copy link

coveralls commented Jan 12, 2024

Coverage Status

coverage: 64.601% (-0.02%) from 64.625%
when pulling c16afc6 on andydotxyz:feature/blockscreenlock
into 4f617dc on fyne-io:develop.

@dweymouth
Copy link
Contributor

dweymouth commented Jan 12, 2024

Should this really be a desktop API as well? Isn't asking the screen not to sleep pretty much a mobile-only thing?

At a minimum, if we want this to be an all-platform API it should probably be RequestDisableScreenBlanking or similar, to reflect that some OSes/DEs may refuse the request or not support it at all

@andydotxyz
Copy link
Member Author

andydotxyz commented Jan 12, 2024

I was going on what the linked issue described - the way that macOS, Windows and Linux allow apps to stop screensaver in the same way the mobile stops the screen switch off / lock.

to reflect that some OSes/DEs may refuse the request or not support it at all

I've not found one that can block this request yet.

@dweymouth
Copy link
Contributor

I was going on what the linked issue described - the way that macOS, Windows and Linux allow apps to stop screensaver in the same way the mobile stops the screen switch off / lock.

to reflect that some OSes/DEs may refuse the request or not support it at all

I've not found one that can block this request yet.

Ah, OK, hadn't seen the latest comment activity on the ticket. I'd say if we can at least verify that we can support it on Windows, Mac, and X11, then we can go with the Set... naming as proposed in this PR. The actual implementation could wait until a follow-up PR

device.go Outdated Show resolved Hide resolved
Copy link
Contributor

@dweymouth dweymouth left a comment

Choose a reason for hiding this comment

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

I think this is good to go now, as long as we remember to add the desktop implementation before pulling it into a release

@andydotxyz andydotxyz merged commit 77c3702 into fyne-io:develop Jan 26, 2024
12 checks passed
@andydotxyz andydotxyz deleted the feature/blockscreenlock branch January 26, 2024 16:48
@andydotxyz
Copy link
Member Author

Thanks, I opened #4567 to remind us about desktop, and added it to 2.5 milestone

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.

Allow apps to block screen locking/screensaver
3 participants