mirror of
https://github.com/swaywm/sway.git
synced 2026-02-22 01:40:39 -05:00
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:
parent
58af001517
commit
7b138e5ef0
18 changed files with 251 additions and 141 deletions
|
|
@ -54,6 +54,10 @@ struct sway_server {
|
|||
struct wl_listener server_decoration;
|
||||
struct wl_list decorations; // sway_server_decoration::link
|
||||
|
||||
struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager;
|
||||
struct wl_listener xdg_decoration;
|
||||
struct wl_list xdg_decorations; // sway_xdg_decoration::link
|
||||
|
||||
size_t txn_timeout_ms;
|
||||
list_t *transactions;
|
||||
list_t *dirty_nodes;
|
||||
|
|
@ -78,5 +82,6 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data);
|
|||
void handle_xwayland_surface(struct wl_listener *listener, void *data);
|
||||
#endif
|
||||
void handle_server_decoration(struct wl_listener *listener, void *data);
|
||||
void handle_xdg_decoration(struct wl_listener *listener, void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue