Skip to content

Commit

Permalink
Disable forwarding the Escape event (#10697)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorNefario committed Apr 13, 2021
1 parent 04101d2 commit 28e9f16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void StartUserSession()
}
}

public void EndUserSession()
public bool EndUserSession()
{
lock (_colorPickerVisibilityLock)
{
Expand All @@ -70,7 +70,11 @@ public void EndUserSession()
}

SessionEventHelper.End();

return true;
}

return false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private void Hook_KeyboardPressed(object sender, GlobalKeyboardHookEventArgs e)
// ESC pressed
if (virtualCode == KeyInterop.VirtualKeyFromKey(Key.Escape))
{
_appStateHandler.EndUserSession();
e.Handled = _appStateHandler.EndUserSession();
return;
}

Expand Down

0 comments on commit 28e9f16

Please sign in to comment.