diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-10-18 17:10:22 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-10-18 17:18:29 -0700 |
commit | f5c9b65592327c2094d5981bb95d3e4afdf76344 (patch) | |
tree | ed1c1e7f3e8bc7dbcb762eca6de9409dace5e7a3 /src/rmd_encode_cache.h | |
parent | c2f9bcd457b57b6d96a5cbdd9c36272994bc19c3 (diff) |
parseargs,error: add --need-shortcuts
When you depend on the shortcuts as _the_ means of
stopping/pausing a recording, like in a WM integration scenario,
it's preferable to have rmd exit fatally when the grabs can't be
setup. (usually this occurs when you've accidentally tried
starting multiple recordings, and the shortcuts collide)
This way, the integration can detect the failure and throw up a
dialog or something informing the user that the recording wasn't
started. All that's needed is including --need-shortcuts.
Note this is a little janky in how it's implemented, because
XSetErrorHandler() is janky and doesn't even support a user
pointer payload.
Rather than introducing global variables to either communicate
the grab failures to other parts of rmd, or exposing the parsed
args struct to the error handler globally in the other direction,
I just made a grab-errors-are-fatal variant of the handler which
gets installed when --need-shortcuts is specified.
Diffstat (limited to 'src/rmd_encode_cache.h')
0 files changed, 0 insertions, 0 deletions