mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Add placeholder output-config verification
Added a placeholder function to verify an output configuration that we've received from a client via output-management-v1. Currently we just assume the config is valid and teturn true, but we should really look at the config before applying it
This commit is contained in:
parent
2a0f171340
commit
50137e0bbe
1 changed files with 16 additions and 2 deletions
18
src/output.c
18
src/output.c
|
|
@ -880,12 +880,26 @@ static void output_config_apply(struct server *server,
|
|||
|
||||
server->pending_output_config = NULL;
|
||||
}
|
||||
|
||||
static bool verify_output_config_v1(const struct wlr_output_configuration_v1 *config)
|
||||
{
|
||||
//TODO implement
|
||||
return true;
|
||||
}
|
||||
|
||||
static void handle_output_manager_apply(struct wl_listener *listener, void* data)
|
||||
{
|
||||
struct server *server = wl_container_of(listener, server, output_manager_apply);
|
||||
struct wlr_output_configuration_v1 *config = data;
|
||||
output_config_apply(server, config);
|
||||
wlr_output_configuration_v1_send_succeeded(config);
|
||||
|
||||
bool config_is_good = verify_output_config_v1(config);
|
||||
|
||||
if(config_is_good) {
|
||||
output_config_apply(server, config);
|
||||
wlr_output_configuration_v1_send_succeeded(config);
|
||||
} else {
|
||||
wlr_output_configuration_v1_send_failed(config);
|
||||
}
|
||||
wlr_output_configuration_v1_destroy(config);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue