diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-24 20:54:57 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-27 22:51:37 +1000 |
commit | 7b138e5ef0f679c9bb0078019d7c9c63fef36273 (patch) | |
tree | 2cdbeb394889065e0606a1fcbe38c1e99e25d260 /include/sway/xdg_decoration.h | |
parent | Merge pull request #2717 from ianyfan/tablet-config (diff) | |
download | sway-7b138e5ef0f679c9bb0078019d7c9c63fef36273.tar.gz sway-7b138e5ef0f679c9bb0078019d7c9c63fef36273.tar.zst sway-7b138e5ef0f679c9bb0078019d7c9c63fef36273.zip |
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.
Diffstat (limited to 'include/sway/xdg_decoration.h')
-rw-r--r-- | include/sway/xdg_decoration.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/sway/xdg_decoration.h b/include/sway/xdg_decoration.h new file mode 100644 index 00000000..46fb8d34 --- /dev/null +++ b/include/sway/xdg_decoration.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _SWAY_XDG_DECORATION_H | ||
2 | #define _SWAY_XDG_DECORATION_H | ||
3 | |||
4 | #include <wlr/types/wlr_xdg_decoration_v1.h> | ||
5 | |||
6 | struct sway_xdg_decoration { | ||
7 | struct wlr_xdg_toplevel_decoration_v1 *wlr_xdg_decoration; | ||
8 | struct wl_list link; | ||
9 | |||
10 | struct sway_view *view; | ||
11 | |||
12 | struct wl_listener destroy; | ||
13 | struct wl_listener surface_commit; | ||
14 | }; | ||
15 | |||
16 | struct sway_xdg_decoration *xdg_decoration_from_surface( | ||
17 | struct wlr_surface *surface); | ||
18 | |||
19 | #endif | ||