Implement gaps (PR #2047)

This commit is contained in:
Nate Symer 2018-06-09 09:34:56 -04:00
parent 21d98d5bfb
commit 6a910b9ba5
9 changed files with 320 additions and 9 deletions

View file

@ -3,6 +3,12 @@
struct sway_container;
// Remove gaps around container
void remove_gaps(struct sway_container *c);
// Add gaps around container
void add_gaps(struct sway_container *c);
// Determine the root container's geometry, then iterate to everything below
void arrange_root(void);

View file

@ -86,6 +86,13 @@ struct sway_container {
double saved_x, saved_y;
double saved_width, saved_height;
// The gaps currently applied to the container.
double current_gaps;
bool has_gaps;
double gaps_inner;
double gaps_outer;
list_t *children;
struct sway_container *parent;