}
}
+static void
+agl_shell_app_on_output(void *data, struct agl_shell *agl_shell,
+ const char *app_id, const char *output_name)
+{
+ (void) agl_shell;
+ (void) output_name;
+ (void) data;
+ (void) app_id;
+
+ LOG("got app_on_output event app_id %s on output\n", app_id, output_name);
+}
+
+
static const struct agl_shell_listener shell_listener = {
- agl_shell_bound_ok,
- agl_shell_bound_fail,
- agl_shell_app_state,
+ agl_shell_bound_ok,
+ agl_shell_bound_fail,
+ agl_shell_app_state,
+ agl_shell_app_on_output,
};
static const struct agl_shell_listener shell_listener_init = {
- agl_shell_bound_ok_init,
- agl_shell_bound_fail_init,
- nullptr,
+ agl_shell_bound_ok_init,
+ agl_shell_bound_fail_init,
+ nullptr,
+ nullptr,
};
static void
sh->shell =
static_cast<struct agl_shell *>(wl_registry_bind(reg, id,
&agl_shell_interface,
- std::min(static_cast<uint32_t>(7), version)));
+ std::min(static_cast<uint32_t>(10), version)));
agl_shell_add_listener(sh->shell, &shell_listener, data);
sh->version = version;
} else if (strcmp(interface, "wl_output") == 0) {
sh->shell =
static_cast<struct agl_shell *>(wl_registry_bind(reg, id,
&agl_shell_interface,
- std::min(static_cast<uint32_t>(7), version)));
+ std::min(static_cast<uint32_t>(10), version)));
agl_shell_add_listener(sh->shell, &shell_listener_init, data);
sh->version = version;
}
struct shell_data_init *sh = new struct shell_data_init;
wl_display = wl_display_connect(NULL);
+ if (!wl_display) {
+ goto err;
+ }
registry = wl_display_get_registry(wl_display);
sh->wait_for_bound = true;
sh->bound_fail = false;
struct shell_data *sh = new struct shell_data;
+ if (!wl_display) {
+ goto err;
+ }
+
sh->wl_display = wl_display;
sh->wait_for_doas = true;
sh->wait_for_bound = true;
ret = wl_display_dispatch(sh->wl_display);
}
+ thread.join();
destroy_shell_data(sh);
return 0;
}