mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
7b138e5ef0
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.
19 lines
412 B
C
19 lines
412 B
C
#ifndef _SWAY_XDG_DECORATION_H
|
|
#define _SWAY_XDG_DECORATION_H
|
|
|
|
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
|
|
|
struct sway_xdg_decoration {
|
|
struct wlr_xdg_toplevel_decoration_v1 *wlr_xdg_decoration;
|
|
struct wl_list link;
|
|
|
|
struct sway_view *view;
|
|
|
|
struct wl_listener destroy;
|
|
struct wl_listener surface_commit;
|
|
};
|
|
|
|
struct sway_xdg_decoration *xdg_decoration_from_surface(
|
|
struct wlr_surface *surface);
|
|
|
|
#endif
|