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

Port 'Session Monitor and Inhibit' to Vala #176

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

BharatAtbrat
Copy link
Contributor

Added Vala code for Session Monitor and Inhibit

I don't know how to test this demo (I'd be grateful for more information about what this demo does )

Let me know if there are any changes/ issues with the code :)

Add Vala code for Session Monitor and Inhibit
@Diego-Ivan
Copy link
Contributor

I don't know how to test this demo (I'd be grateful for more information about what this demo does)

By inhibiting a session, you warn about (and prevent) the user terminating a running session while the program that is doing something important. GNOME Shell displays that warning like this:

Captura desde 2024-06-12 17-55-38

When the session is finishing (i.e, when the user wants to power off, restart their computer or log out of their session) the app that is inhibiting the session will be notified, so it saves unsaved progress, safely cancels a running operation, or other actions that may require a more graceful shutdown. After finishing said task, it can uninhibit the session so the user can terminate it. You can test this option by trying to log out of your session or trying to power off you system.

In the case you enable the Idle option, it will prevent the system from going idle (the screen going dark after not moving the mouse after a long time). This option is very useful for games and video apps!

Copy link
Contributor

@Diego-Ivan Diego-Ivan left a comment

Choose a reason for hiding this comment

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

Thanks for porting this demo!

@BharatAtbrat
Copy link
Contributor Author

I don't know how to test this demo (I'd be grateful for more information about what this demo does)

By inhibiting a session, you warn about (and prevent) the user terminating a running session while the program that is doing something important. GNOME Shell displays that warning like this:

Captura desde 2024-06-12 17-55-38

When the session is finishing (i.e, when the user wants to power off, restart their computer or log out of their session) the app that is inhibiting the session will be notified, so it saves unsaved progress, safely cancels a running operation, or other actions that may require a more graceful shutdown. After finishing said task, it can uninhibit the session so the user can terminate it. You can test this option by trying to log out of your session or trying to power off you system.

In the case you enable the Idle option, it will prevent the system from going idle (the screen going dark after not moving the mouse after a long time). This option is very useful for games and video apps!

Understood. Thank you very much! :)

@sonnyp sonnyp merged commit a95c432 into workbenchdev:main Jun 14, 2024
1 check passed
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.

3 participants