Add CSD to border modes

This replaces view.using_csd with a new border mode: B_CSD. This also
removes sway_xdg_shell{_v6}_view.deco_mode and
view->has_client_side_decorations as we can now get these from the
border.

You can use `border toggle` to cycle through the modes including CSD, or
use `border csd` to set it directly. The client must support the
xdg-decoration protocol, and the only client I know of that does is the
example in wlroots.

If the client switches from SSD to CSD without us expecting it (via the
server-decoration protocol), we stash the previous border type into
view.saved_border so we can restore it if the client returns to SSD. I
haven't found a way to test this though.
This commit is contained in:
Ryan Dwyer 2018-09-24 20:54:57 +10:00
parent 58af001517
commit 7b138e5ef0
18 changed files with 251 additions and 141 deletions

View file

@ -175,7 +175,8 @@ static enum wlr_edges find_edge(struct sway_container *cont,
return WLR_EDGE_NONE;
}
struct sway_view *view = cont->view;
if (view->border == B_NONE || !view->border_thickness || view->using_csd) {
if (view->border == B_NONE || !view->border_thickness ||
view->border == B_CSD) {
return WLR_EDGE_NONE;
}