Previously if the view did not take the size requested, we would draw
the borders around the size we asked the view to take rather than its
actual size.
The state struct holds all of the state that is double-buffered and
applied through transactions. This more explicit handling simplifies
much of the code, and will allow for easier implementation of new
feature such as fullscreen.
This is in preperation for fullscreen support which will add another
mode to this enum.
This commit also fixes a bug that allowed clicking floating views though
layout views in some cases.
river is not a library and passing a general purpose allocators around
everywhere does not make sense and leads to ugly code. This does not
prevent us from using local arenas if they are fitting.
- wait until map to send tiled state
- only set toplevels with no parent to tiled (toplevels with a parent
are generally popup-like things such as a file chooser or yes/no prompt)
- track dimesions and offset of the surface and take offset into account
for rendering.
This implementation is far simpler than c0d7e71 as it takes advantage of
wlroots's tracking of pending state.
Additionally, we now send frame done events if a view that we are
configuring commits with the wrong dimensions. This is necessary in
order to trigger a redraw for some clients as well as being a more
correct implementation of the protocol.
when a transaction interrupts an ongoing transaction, we must be careful
to handle the configures properly. This commit adds a new member to view
so that we can store the dimensions sent with the last configure in
order to determine if the preempting transaction should override the
ongoing configure or not.
Additionally, some views do not ack a configure if they already have the
requested dimensions. This can happen if a pending configure setting
alternative dimensions is overridden, so in this case we do not wait for
an ack before committing the transaction.