diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-06 11:32:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-06 11:32:17 -0400 |
commit | d8b65193c493e5826383a08593395a598ce4b503 (patch) | |
tree | 97a1da416928ad8d7d3cca2e3e7dd72c39f924b6 /include/sway | |
parent | 1a8bee68b40f641f57adc97d0f2ffcf5e2ed544d (diff) | |
parent | d2ac48f9206e9962ab47f337f824ce7f69ffb9c1 (diff) |
Merge pull request #2268 from emersion/server-decoration-borders
Enable borders on floating SSD xdg-shell views
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/decoration.h | 17 | ||||
-rw-r--r-- | include/sway/server.h | 11 | ||||
-rw-r--r-- | include/sway/tree/view.h | 4 |
3 files changed, 31 insertions, 1 deletions
diff --git a/include/sway/decoration.h b/include/sway/decoration.h new file mode 100644 index 00000000..7916746e --- /dev/null +++ b/include/sway/decoration.h @@ -0,0 +1,17 @@ +#ifndef _SWAY_DECORATION_H +#define _SWAY_DECORATION_H + +#include <wlr/types/wlr_server_decoration.h> + +struct sway_server_decoration { + struct wlr_server_decoration *wlr_server_decoration; + struct wl_list link; + + struct wl_listener destroy; + struct wl_listener mode; +}; + +struct sway_server_decoration *decoration_from_surface( + struct wlr_surface *surface); + +#endif diff --git a/include/sway/server.h b/include/sway/server.h index a3782f91..b93584b6 100644 --- a/include/sway/server.h +++ b/include/sway/server.h @@ -4,12 +4,13 @@ #include <wayland-server.h> #include <wlr/backend.h> #include <wlr/backend/session.h> +#include <wlr/render/wlr_renderer.h> #include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_data_device.h> #include <wlr/types/wlr_layer_shell.h> +#include <wlr/types/wlr_server_decoration.h> #include <wlr/types/wlr_xdg_shell_v6.h> #include <wlr/types/wlr_xdg_shell.h> -#include <wlr/render/wlr_renderer.h> // TODO WLR: make Xwayland optional #include "list.h" #include "config.h" @@ -42,11 +43,17 @@ struct sway_server { struct wlr_xdg_shell *xdg_shell; struct wl_listener xdg_shell_surface; + #ifdef HAVE_XWAYLAND struct sway_xwayland xwayland; struct wl_listener xwayland_surface; struct wl_listener xwayland_ready; #endif + + struct wlr_server_decoration_manager *server_decoration_manager; + struct wl_listener server_decoration; + struct wl_list decorations; // sway_server_decoration::link + bool debug_txn_timings; list_t *transactions; @@ -71,4 +78,6 @@ void handle_xdg_shell_surface(struct wl_listener *listener, void *data); #ifdef HAVE_XWAYLAND void handle_xwayland_surface(struct wl_listener *listener, void *data); #endif +void handle_server_decoration(struct wl_listener *listener, void *data); + #endif diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 4a3f01e7..c2225bcb 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -118,6 +118,8 @@ struct sway_view { struct sway_xdg_shell_v6_view { struct sway_view view; + enum wlr_server_decoration_manager_mode deco_mode; + struct wl_listener commit; struct wl_listener request_move; struct wl_listener request_resize; @@ -134,6 +136,8 @@ struct sway_xdg_shell_v6_view { struct sway_xdg_shell_view { struct sway_view view; + enum wlr_server_decoration_manager_mode deco_mode; + struct wl_listener commit; struct wl_listener request_move; struct wl_listener request_resize; |