Require a Password When Woken From Sleep Only When Specifically Requested?
The following assumes you have/use a Login password:

do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"


This can be used in AppleScript to invoke the Login window, which will not close whatever you currently have open and as such when you log back in, your Desktop is as you left it.

This way you can have the "Require password ... after sleep or screen saver begins" check box in Security &amp; Privacy's General tab unchecked but still not let someone have immediate access after you walk away, having invoked the Login window.