Focus was made double-buffered in 96a91fd. However, much of the code
still behaved as if focus was separate from the transaction system.
This commit completes the work started in 96a91fd and ensures that
focus is applied consistently in a single transaction.
- require the caller to use Root.startTransaction() directly
- introduce View.applyPending() to unify logic
- introduce View.shouldTrackConfigure() to unify more logic
- update all callsites to intelligently rearrange only what is necessary
When a floating view is returned to the layout or made fullscreen, it
now saves the dimesions it had while floating and returns to that same
position/size if made to float again.
Transactions are only useful when multiple views need to atomically
change size together. Float/fullscreen views are independant of the
layout and should bypass the transaction system.
`riverctl set-option view_padding 10` becomes `riverctl view-padding 10`
Having set-option doesn't really gain us anything and is more verbose as
well as being slightly inaccurate as the changes instantly apply.
This simplifies the handling of the current/pending tags and will be
used in the future for atomic layout updates involving layer surface
exclusive zones.
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.
This is trivial to support and allows basic customization without
running a layer-shell program such as swaybg. This is especially useful
in low memory situations.