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/server.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/server.h')
-rw-r--r-- | include/sway/server.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sway/server.h b/include/sway/server.h index 5dabb61f..3e1cbb33 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -54,6 +54,10 @@ struct sway_server { | |||
54 | struct wl_listener server_decoration; | 54 | struct wl_listener server_decoration; |
55 | struct wl_list decorations; // sway_server_decoration::link | 55 | struct wl_list decorations; // sway_server_decoration::link |
56 | 56 | ||
57 | struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager; | ||
58 | struct wl_listener xdg_decoration; | ||
59 | struct wl_list xdg_decorations; // sway_xdg_decoration::link | ||
60 | |||
57 | size_t txn_timeout_ms; | 61 | size_t txn_timeout_ms; |
58 | list_t *transactions; | 62 | list_t *transactions; |
59 | list_t *dirty_nodes; | 63 | list_t *dirty_nodes; |
@@ -78,5 +82,6 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data); | |||
78 | void handle_xwayland_surface(struct wl_listener *listener, void *data); | 82 | void handle_xwayland_surface(struct wl_listener *listener, void *data); |
79 | #endif | 83 | #endif |
80 | void handle_server_decoration(struct wl_listener *listener, void *data); | 84 | void handle_server_decoration(struct wl_listener *listener, void *data); |
85 | void handle_xdg_decoration(struct wl_listener *listener, void *data); | ||
81 | 86 | ||
82 | #endif | 87 | #endif |