From 555721f7142e1e363c17820657fb1e2b004e7c54 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 10 Jun 2018 11:15:26 +0100 Subject: Add xdg-decoration-unstable-v1 support --- include/rootston/desktop.h | 13 +++++++------ include/rootston/view.h | 9 +++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'include/rootston') diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 2d28fa10..51cf68db 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -13,17 +14,14 @@ #include #include #include +#include #include #include #include #include +#include #include #include -#include -#include -#include -#include -#include "rootston/view.h" #include "rootston/config.h" #include "rootston/output.h" #include "rootston/view.h" @@ -48,6 +46,7 @@ struct roots_desktop { struct wlr_screenshooter *screenshooter; struct wlr_export_dmabuf_manager_v1 *export_dmabuf_manager_v1; struct wlr_server_decoration_manager *server_decoration_manager; + struct wlr_xdg_decoration_manager_v1 *xdg_decoration_manager; struct wlr_primary_selection_device_manager *primary_selection_device_manager; struct wlr_idle *idle; struct wlr_idle_inhibit_manager_v1 *idle_inhibit; @@ -64,7 +63,7 @@ struct roots_desktop { struct wl_listener xdg_shell_surface; struct wl_listener wl_shell_surface; struct wl_listener layer_shell_surface; - struct wl_listener decoration_new; + struct wl_listener xdg_toplevel_decoration; struct wl_listener input_inhibit_activate; struct wl_listener input_inhibit_deactivate; struct wl_listener virtual_keyboard_new; @@ -94,6 +93,7 @@ void view_apply_damage(struct roots_view *view); void view_damage_whole(struct roots_view *view); void view_update_position(struct roots_view *view, double x, double y); void view_update_size(struct roots_view *view, uint32_t width, uint32_t height); +void view_update_decorated(struct roots_view *view, bool decorated); void view_initial_focus(struct roots_view *view); void view_map(struct roots_view *view, struct wlr_surface *surface); void view_unmap(struct roots_view *view); @@ -101,6 +101,7 @@ void view_arrange_maximized(struct roots_view *view); void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); void handle_xdg_shell_surface(struct wl_listener *listener, void *data); +void handle_xdg_toplevel_decoration(struct wl_listener *listener, void *data); void handle_wl_shell_surface(struct wl_listener *listener, void *data); void handle_layer_shell_surface(struct wl_listener *listener, void *data); void handle_xwayland_surface(struct wl_listener *listener, void *data); diff --git a/include/rootston/view.h b/include/rootston/view.h index 4e3859d5..69cbc87c 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -190,6 +191,14 @@ struct roots_xdg_popup { struct wl_listener new_popup; }; +struct roots_xdg_toplevel_decoration { + struct wlr_xdg_toplevel_decoration_v1 *wlr_decoration; + struct roots_xdg_surface *surface; + struct wl_listener destroy; + struct wl_listener request_mode; + struct wl_listener surface_commit; +}; + void view_get_box(const struct roots_view *view, struct wlr_box *box); void view_activate(struct roots_view *view, bool active); void view_move(struct roots_view *view, double x, double y); -- cgit v1.2.3