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

[IDEA] Prevent Screensaver While In Certain Apps #60

Open
1 of 2 tasks
zipperhead46237 opened this issue May 22, 2022 · 6 comments
Open
1 of 2 tasks

[IDEA] Prevent Screensaver While In Certain Apps #60

zipperhead46237 opened this issue May 22, 2022 · 6 comments
Labels
idea App idea

Comments

@zipperhead46237
Copy link

zipperhead46237 commented May 22, 2022

Please read conditions below carefully, and don't delete this part. Invalid issues will be closed.

  • No apps related to piracy or intellectual property infringement is allowed.
  • We can't guarantee if the app will be developed by anyone.
  • We encourage you to develop the app by yourself. This would be a great contribution to webOS homebrew community.
  • I understand conditions above
  • (Optional) I'd like to develop this app by myself

Issue content starts below this line

---It would be great to have an app that you could list, or select from a list of apps, that while running in the foreground, the LG screensaver would be prevented from coming on.

@zipperhead46237 zipperhead46237 added the idea App idea label May 22, 2022
@mariotaku mariotaku changed the title [IDEA] App that you can select or add apps to will prevent the LG Screensaver from turning on [IDEA] Prevent Screensaver While In Certain Apps May 22, 2022
@zipperhead46237
Copy link
Author

I could provide info from the LGC1 if needed to support.

@zipperhead46237
Copy link
Author

I would love to assist but almost no programming skills but mediocre System Administration skills.

@mariotaku
Copy link
Member

Thank you for this suggestion. This is a good one.

@mariotaku
Copy link
Member

mariotaku commented May 22, 2022

Done some researches about this. I don't have enough time to do this, but should be helpful for application developers wants to prevent their apps from sleeping:

For SDL applications

Use SDL_DisableScreenSaver and SDL_EnableScreenSaver.

For other applications (like webapps)

You can register on this Luna URI:

luna://com.webos.service.tvpower/power/registerScreenSaverRequest

with params

{
  "subscribe": true,
  "clientName": "AnyValue"
}

When screensaver is about to start, you will receive following message:

{
  "returnValue": true,
  "timestamp": "1388518297",
  "state": "Active",
  "instantBoot": "on"
}

Send message to this URI:

luna://com.webos.service.tvpower/power/responseScreenSaverRequest

with params

{
  "clientName": "AnyValue",
  "ack": false,
  "timestamp": "1388518297"
}

@SuneKjaergaard
Copy link

You can register on this Luna URI:

luna://com.webos.service.tvpower/power/registerScreenSaverRequest

Does anyone know if this still works? We had it working, but now it looks like we don't get a callback

@mariotaku
Copy link
Member

@SuneKjaergaard I think it still works. I'm still using that in my SDL port: https://github.com/webosbrew/SDL-webOS/blob/b18d7026e20bb5422f4b87910c586cbb0ecabd82/src/core/webos/SDL_webos_init.c#L230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea App idea
Projects
None yet
Development

No branches or pull requests

3 participants