monitor: wrap usage of wlr_output_state

for better control and convenience in usage.

fixes #4546
This commit is contained in:
Vaxry
2024-01-28 01:57:13 +00:00
parent 9002657bcc
commit bfcc2adbda
8 changed files with 124 additions and 101 deletions

View File

@@ -183,9 +183,9 @@ void Events::listener_powerMgrSetMode(wl_listener* listener, void* data) {
return;
}
wlr_output_state_set_enabled(&PMONITOR->outputState, EVENT->mode == 1);
wlr_output_state_set_enabled(PMONITOR->state.wlr(), EVENT->mode == 1);
if (!wlr_output_commit_state(EVENT->output, &PMONITOR->outputState))
if (!PMONITOR->state.commit())
Debug::log(ERR, "Couldn't set power mode");
}