Merge pull request #1241 from emersion/output-enable-error-checking

output: make wlr_output_enable return a bool
This commit is contained in:
Drew DeVault 2018-09-14 21:14:18 -04:00 committed by GitHub
commit df991a55ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 10 deletions

View file

@ -142,14 +142,15 @@ static void output_update_matrix(struct wlr_output *output) {
output->height, output->transform);
}
void wlr_output_enable(struct wlr_output *output, bool enable) {
bool wlr_output_enable(struct wlr_output *output, bool enable) {
if (output->enabled == enable) {
return;
return true;
}
if (output->impl->enable) {
output->impl->enable(output, enable);
return output->impl->enable(output, enable);
}
return false;
}
bool wlr_output_set_mode(struct wlr_output *output,