Implement borders

The borders are implemented as a surface/buffer attached to each view
which is sent to and rendered by wlc in the view_pre_render callback.

All the drawing logic is handled in sway/border.c and all the logic for
calculating the geometry of the border/view is handled in
`update_geometry` in sway/layout.c (same place as gaps are calculated).
This commit is contained in:
Mikkel Oscar Lyderik 2016-03-29 14:47:30 +02:00
parent 3b05f92f76
commit 5a13cb0ed1
12 changed files with 386 additions and 149 deletions

View file

@ -115,15 +115,16 @@ struct sway_container {
* If this container's children include a fullscreen view, this is that view.
*/
struct sway_container *fullscreen;
/**
* If this container is a view, this may be set to the window's decoration
* buffer (or NULL).
*/
unsigned char *border;
enum swayc_border_types border_type;
/**
* If this container is a view, this may be set to the window's decoration
* buffer (or NULL).
*/
unsigned char *border;
enum swayc_border_types border_type;
struct wlc_geometry border_geometry;
struct wlc_geometry presumed_geometry;
int border_thickness;
struct wlc_geometry title_bar_geometry;
struct wlc_geometry actual_geometry;
int border_thickness;
};
enum visibility_mask {