clients/screenshot: Add support for weston output capture
[src/agl-compositor.git] / src / compositor.c
index 1881702..bdff9ed 100644 (file)
@@ -103,6 +103,13 @@ ivi_init_parsed_options(struct weston_compositor *compositor)
        return config;
 }
 
+static void
+screenshot_allow_all(struct wl_listener *l, struct weston_output_capture_attempt *att)
+{
+       att->authorized = true;
+}
+
+
 static void
 sigint_helper(int sig)
 {
@@ -2237,8 +2244,11 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da
        ivi_launch_shell_client(&ivi, "shell-client-ext",
                                &ivi.shell_client_ext.client);
 
-       if (debug)
-               ivi_screenshooter_create(&ivi);
+       if (debug) {
+               weston_compositor_add_screenshot_authority(ivi.compositor,
+                                          &ivi.screenshot_auth,
+                                          screenshot_allow_all);
+       }
        ivi_agl_systemd_notify(&ivi);
 
        wl_display_run(display);