Is there a reason why the Output.commit() method is implemented this way:
def commit(self) -> None:
"""Commit the pending output state
If `.attach_render` has been called, the pending frame will be
submitted for display.
"""
if not lib.wlr_output_test(self._ptr):
self.rollback()
raise RuntimeError("Rendering on output failed")
if not lib.wlr_output_commit(self._ptr):
raise RuntimeError("Unable to commit output")
Shouldn't the following be sufficient:
def commit(self) -> bool:
"""Commit the pending output state
If `.attach_render` has been called, the pending frame will be
submitted for display.
"""
return lib.wlr_output_commit(self._ptr)
See the wlroot docs for the commit function:
/**
* Commit the pending output state. If wlr_output_attach_render() has been
* called, the pending frame will be submitted for display and a `frame` event
* will be scheduled.
*
* On failure, the pending changes are rolled back.
*/
bool wlr_output_commit(struct wlr_output *output);
Is there a reason why the Output.commit() method is implemented this way:
Shouldn't the following be sufficient:
See the wlroot docs for the commit function: