DRAFT: configure clients via content sizes
This is a proposal on simplifying the API for the configure event and reduce the amount of functions that have to be called by the client inside the configure
callback.
Previously, when a configure
event is received, the client's callback would be called with a libdecor_configuration
that contains, amongst others, the window dimensions and state. Since this type is opaque, the client would need to use the additional functions libdecor_configuration_get_content_size
and libdecor_configuration_get_window_state
to get the content size and the window state from the configuration and then create and commit a libdecor_state
with the new desired content size and the original libdecor_configuration
.
In this MR, I propose to simplify this by directly providing the content size and window state to the client's callback as the non-opaque type libdecor_state
, so that the client does not have to convert or extract the hidden information. Additionally, since we always have to acknowledge a configure
event, we should handle this for the client. Hence, the client only has to amend the provided libdecor_state
and does not need to call any other API functions inside its configure
callback.
To allow this simplification, the client must not commit the top-level surface on its own during this configure event but must wait until libdecor_frame_toplevel_commit
gets called.