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

Power button options #173

Closed
gbjbaanb opened this issue Jun 5, 2019 · 1 comment
Closed

Power button options #173

gbjbaanb opened this issue Jun 5, 2019 · 1 comment

Comments

@gbjbaanb
Copy link

gbjbaanb commented Jun 5, 2019

I noticed the menu does not honour the settings in I noticed the power button menu (ie the flyout with sleep, hibernate, shutdown etc) does not honour the settings made in Control panel's power options.

If you go to CP -> Power Options -> "Choose what the power buttons do", there is a pane with "shut-down settings" that has 4 checkboxes. 3 of these turn the power menu's buttons on or off (or rather show/hide them). Unchecking any of them doesn't affect the menu,

In the code (CMenuContainer::ToggleStartMenu), I noticed there was code to detect the power options from the OS (using GetPwrCapabilities) but this only returns power capabilities, not the control panel choices.

The choice of showing the buttons is stored in the registry, in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings

I don't know if there is a system API to retrieve these.

@gbjbaanb
Copy link
Author

gbjbaanb commented Jun 5, 2019

#174

@ge0rdi ge0rdi closed this as completed in 1a5f62a Jun 6, 2019
ge0rdi added a commit to ge0rdi/Open-Shell-Menu that referenced this issue Jun 9, 2019
Commit 1a5f62a added possibility to hide Lock/Sleep/Hibernate buttons if
they were disabled in system power settings.

Unfortunately this didn't work for Lock button.

To fix the behavior we have to add lock command to `g_StdOptions` array
and then all the checks introduced in 1a5f62a will apply properly.

 Open-Shell#173
ge0rdi added a commit that referenced this issue Jun 9, 2019
Commit 1a5f62a added possibility to hide Lock/Sleep/Hibernate buttons if
they were disabled in system power settings.

Unfortunately this didn't work for Lock button.

To fix the behavior we have to add lock command to `g_StdOptions` array
and then all the checks introduced in 1a5f62a will apply properly.

 #173
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

No branches or pull requests

1 participant