Skip to content

Commit

Permalink
1.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Mar 9, 2024
1 parent 17d928d commit 1651527
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- fixed issues with "IsProtectScreen=y" [3656](https://github.com/sandboxie-plus/Sandboxie/pull/3656#discussion_r1518549704)

- fixed issue with hotkeys and changed default suspend all hotkey to Shift+Alt+Pause
- fixed issue with suspended state not being updated when the global hotkey was used



Expand Down
39 changes: 27 additions & 12 deletions SandboxiePlus/SandMan/SandMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2644,19 +2644,31 @@ void CSandMan::CheckSupport()

void CSandMan::SetupHotKeys()
{
m_pHotkeyManager->unregisterAllHotkeys();
QString HotKey;
try
{
m_pHotkeyManager->unregisterAllHotkeys();

HotKey = "PanicKey";
if (theConf->GetBool("Options/EnablePanicKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/PanicKeySequence", "Shift+Pause"), HK_PANIC);

if (theConf->GetBool("Options/EnablePanicKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/PanicKeySequence", "Shift+Pause"), HK_PANIC);
HotKey = "TopMostKey";
if (theConf->GetBool("Options/EnableTopMostKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/TopMostKeySequence", "Alt+Pause"), HK_TOP);

if (theConf->GetBool("Options/EnableTopMostKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/TopMostKeySequence", "Alt+Pause"), HK_TOP);
HotKey = "PauseForceKey";
if (theConf->GetBool("Options/EnablePauseForceKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/PauseForceKeySequence", "Ctrl+Alt+F"), HK_FORCE);

if (theConf->GetBool("Options/EnablePauseForceKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/PauseForceKeySequence", "Ctrl+Alt+F"), HK_FORCE);

if (theConf->GetBool("Options/EnableSuspendKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/SuspendKeySequence", "Ctrl+Pause"), HK_SUSPEND);
HotKey = "SuspendKey";
if (theConf->GetBool("Options/EnableSuspendKey", false))
m_pHotkeyManager->registerHotkey(theConf->GetString("Options/SuspendKeySequence", "Shift+Alt+Pause"), HK_SUSPEND);
}
catch (UException& err)
{
QMessageBox::critical(this, "Sandboxie-Plus", tr("Failed to configure hotkey %1, error: %2").arg(HotKey).arg(err.what()));
}
}

void CSandMan::OnHotKey(size_t id)
Expand All @@ -2679,8 +2691,11 @@ void CSandMan::OnHotKey(size_t id)

case HK_SUSPEND:
{
for (auto each : theAPI->GetAllBoxes())
each->SetSuspendedAll(TRUE);
for (auto pBox: theAPI->GetAllBoxes()) {
pBox->SetSuspendedAll(TRUE);
for (auto pProcess : pBox->GetProcessList())
pProcess->TestSuspended();
}
break;
}

Expand Down

0 comments on commit 1651527

Please sign in to comment.