return weston_compositor_get_user_data(ec);
}
+void
+ivi_process_destroy(struct wet_process *process, int status, bool call_cleanup)
+{
+ wl_list_remove(&process->link);
+ if (call_cleanup && process->cleanup)
+ process->cleanup(process, status, process->cleanup_data);
+ free(process->path);
+ free(process);
+}
+
struct ivi_output_config *
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)
{
config->base.struct_version = WESTON_RDP_BACKEND_CONFIG_VERSION;
config->base.struct_size = sizeof(struct weston_rdp_backend_config);
+ config->renderer = WESTON_RENDERER_AUTO;
config->bind_address = NULL;
config->port = 3389;
config->rdp_key = NULL;
config->server_cert = NULL;
config->server_key = NULL;
config->env_socket = 0;
- config->no_clients_resize = 1;
+ config->external_listener_fd = -1;
+ config->no_clients_resize = 0;
config->force_no_compression = 0;
+ config->remotefx_codec = true;
+ config->refresh_rate = RDP_DEFAULT_FREQ;
+
}
static int
new_mode.width = width;
new_mode.height = height;
+ weston_log("Setting modeline to %dx%d\n", width, height);
+
api->output_set_mode(output, &new_mode);
weston_output_set_transform(output, transform);
}
static int
-load_rdp_backend(struct ivi_compositor *ivi, int *argc, char **argv)
+load_rdp_backend(struct ivi_compositor *ivi, int *argc, char **argv,
+ enum weston_renderer_type renderer)
{
struct weston_rdp_backend_config config = {};
struct weston_config_section *section;
+ bool no_remotefx_codec = false;
struct ivi_output_config *parsed_options = ivi_init_parsed_options(ivi->compositor);
if (!parsed_options)
const struct weston_option rdp_options[] = {
{ WESTON_OPTION_BOOLEAN, "env-socket", 0, &config.env_socket },
+ { WESTON_OPTION_INTEGER, "external-listener-fd", 0, &config.external_listener_fd },
{ WESTON_OPTION_INTEGER, "width", 0, &parsed_options->width },
{ WESTON_OPTION_INTEGER, "height", 0, &parsed_options->height },
- { WESTON_OPTION_INTEGER, "transform", 0, &parsed_options->transform },
- { WESTON_OPTION_INTEGER, "scale", 0, &parsed_options->scale },
{ WESTON_OPTION_STRING, "address", 0, &config.bind_address },
{ WESTON_OPTION_INTEGER, "port", 0, &config.port },
{ WESTON_OPTION_BOOLEAN, "no-clients-resize", 0, &config.no_clients_resize },
{ WESTON_OPTION_STRING, "rdp4-key", 0, &config.rdp_key },
{ WESTON_OPTION_STRING, "rdp-tls-cert", 0, &config.server_cert },
{ WESTON_OPTION_STRING, "rdp-tls-key", 0, &config.server_key },
+ { WESTON_OPTION_INTEGER, "scale", 0, &parsed_options->scale },
{ WESTON_OPTION_BOOLEAN, "force-no-compression", 0, &config.force_no_compression },
+ { WESTON_OPTION_BOOLEAN, "no-remotefx-codec", 0, &no_remotefx_codec },
};
+ config.remotefx_codec = !no_remotefx_codec;
+ config.renderer = renderer;
+
section = weston_config_get_section(ivi->config, "rdp", NULL, NULL);
+ weston_config_section_get_int(section, "refresh-rate",
+ &config.refresh_rate, RDP_DEFAULT_FREQ);
+
weston_config_section_get_string(section, "tls-cert",
&config.server_cert, config.server_cert);
parse_options(rdp_options, ARRAY_LENGTH(rdp_options), argc, argv);
+ weston_log("No clients resize: %d\n", config.no_clients_resize);
ivi->simple_output_configure = rdp_backend_output_configure;
}
#else
static int
-load_rdp_backend(struct ivi_compositor *ivi, int *argc, char **argv)
+load_rdp_backend(struct ivi_compositor *ivi, int *argc, char **argv,
+ enum weston_renderer_type renderer)
{
return -1;
}
case WESTON_BACKEND_DRM:
return load_drm_backend(ivi, argc, argv, renderer);
case WESTON_BACKEND_RDP:
- return load_rdp_backend(ivi, argc, argv);
+ return load_rdp_backend(ivi, argc, argv, renderer);
case WESTON_BACKEND_WAYLAND:
return load_wayland_backend(ivi, argc, argv, renderer);
case WESTON_BACKEND_X11:
strftime(timestr, sizeof(timestr), "%H:%M:%S", brokendown_time);
/* if datestr is empty it prints only timestr*/
- snprintf(buf, len, "%s[%s.%03li]", datestr,
+ snprintf(buf, len, "%s[%s.%03"PRIi64"]", datestr,
timestr, (tv.tv_usec / 1000));
return buf;
bool xwayland = false;
struct sigaction action;
char *renderer = NULL;
+ struct wet_process *process, *process_tmp;
const struct weston_option core_options[] = {
{ WESTON_OPTION_STRING, "renderer", 'r', &renderer },
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);
ivi_policy_destroy(ivi.policy);
+ wl_list_for_each_safe(process, process_tmp, &ivi.child_process_list, link)
+ ivi_process_destroy(process, 0, false);
+
error_signals:
for (size_t i = 0; i < ARRAY_LENGTH(signals); ++i)
if (signals[i])