Repository navigation
CLI: Try to inhibit screensaver in fullscreen (Windows only) - #4507
Conversation
|
Hello @gzotti! Thank you for proposing of the feature. |
|
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
This is an automatically generated QA checklist based on modified files. |
|
It would be better to put this code into a separate function, taking as a parameter whether the window is fullscreen, than to litter the two branches with platform-specific code. On the Linux side you'll have to check what windowing system is in use. In Wayland there's the |
|
Seems it does not even work on the laptop where I need it. Maybe there are still other mechanisms. maybe this works: https://gitlab.com/qt-goodies/qscreensaver |
|
VLC has code for suppressing screensaver on all platforms. |
|
https://github.com/Simbiat/SnoozeGuard works for now. An integrated solution may come later... |
Move screensaver disabling to separate methods.
3420a4b to
6add7c4
Compare
Wouldn't that finally require implementing D-Bus support? (It was a long-standing wish, but without the "killer app" to show off its capabilities. The RC plugin API is used instead...) |
Yes it would. But given how tiny the use case is, the dependency on |
|
This works as originally intended, on Windows for now, and is ready to merge. It's a limited use case, if users on the other OSes are interested, somebody else working on those platforms might be able to do that later. (I am still waiting for somebody on Mac fulfilling the Syphon request that was answered on Windows with Spout...) |
|
I think the screensaver inhibition code should be moved to its own class, like |
|
This is just a timer and two short methods, one of them for the timer. Isn't that overengineering? |
Well, this is a good question. Given that this is highly platform-specific and has a potential to get more platform-specific code for other platforms, I don't like having all this bunch of But I'm not insisting. If you feel it's not worth it, OK. |
|
If it becomes clearer what has to be done on the other platforms (and maybe the methods need to expand?), it may be good to then move all these methods to another class later. Whoever does it: I can imagine it's something along similar OS specific calls on Mac, and two different paths for X11 and Wayland. I have no hardware for the first, and no time now (and need) for the latter. Are there then even more variations? For now I'd just squash and merge this little change. |
OK. But please change your new |
- also fix indentation
|
@alex-w any comments? |
|
Hello @gzotti! Please check the fresh version (development snapshot) of Stellarium: |
|
Hello @gzotti! Please check the latest stable version of Stellarium: |
Description
When running Stellarium in fullscreen mode for a presentation, it may annoy when the screensaver kicks in after a minute.
A new command-line option should inhibit this.
Idea taken from https://forum.qt.io/topic/38504/solved-qdialog-in-fullscreen-disable-os-screensaver/20
Enabled for Windows for now. I don't know how to do this in Mac/Linux. Some old Mac solution is on this website.
Fixes # (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: