screenshooter: Exit early when screenshot in progress

When we're asked to take a screenshot but are already taking one, just
exit out of the function early.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2022-07-21 15:48:25 +01:00 committed by Pekka Paalanen
parent ed35fc7f6a
commit 961be270b0
1 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,9 @@ screenshooter_binding(struct weston_keyboard *keyboard,
struct screenshooter *shooter = data;
char *screenshooter_exe;
/* Don't start a screenshot whilst we already have one in progress */
if (shooter->client)
return;
screenshooter_exe = wet_get_bindir_path("weston-screenshooter");
if (!screenshooter_exe) {