diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-02-14 12:40:13 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-02-14 12:52:30 +0100 |
commit | 7d26a6debd6e9808d4a4bf7d39b71ad5f5031f79 (patch) | |
tree | 606ab8afdfa404bf67f9df9e23df4a0019f42e1f /include/rootston | |
parent | 71cba94e73022d8cef8651055204a4706377ae11 (diff) |
xdg-shell stable: copy-pasta implementation
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/desktop.h | 4 | ||||
-rw-r--r-- | include/rootston/view.h | 26 |
2 files changed, 30 insertions, 0 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 6572b242..0132a7e8 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -15,6 +15,7 @@ #include <wlr/types/wlr_wl_shell.h> #include <wlr/types/wlr_xcursor_manager.h> #include <wlr/types/wlr_xdg_shell_v6.h> +#include <wlr/types/wlr_xdg_shell.h> #include "rootston/config.h" #include "rootston/output.h" #include "rootston/view.h" @@ -34,6 +35,7 @@ struct roots_desktop { struct wlr_compositor *compositor; struct wlr_wl_shell *wl_shell; struct wlr_xdg_shell_v6 *xdg_shell_v6; + struct wlr_xdg_shell *xdg_shell; struct wlr_gamma_control_manager *gamma_control_manager; struct wlr_screenshooter *screenshooter; struct wlr_server_decoration_manager *server_decoration_manager; @@ -43,6 +45,7 @@ struct roots_desktop { struct wl_listener new_output; struct wl_listener layout_change; struct wl_listener xdg_shell_v6_surface; + struct wl_listener xdg_shell_surface; struct wl_listener wl_shell_surface; struct wl_listener decoration_new; @@ -72,6 +75,7 @@ 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 handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); +void handle_xdg_shell_surface(struct wl_listener *listener, void *data); void handle_wl_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 b61ac330..198086c1 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -6,6 +6,7 @@ #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_xdg_shell_v6.h> +#include <wlr/types/wlr_xdg_shell.h> struct roots_wl_shell_surface { struct roots_view *view; @@ -36,6 +37,21 @@ struct roots_xdg_surface_v6 { uint32_t pending_move_resize_configure_serial; }; +struct roots_xdg_surface { + struct roots_view *view; + + struct wl_listener destroy; + struct wl_listener new_popup; + struct wl_listener request_move; + struct wl_listener request_resize; + struct wl_listener request_maximize; + struct wl_listener request_fullscreen; + + struct wl_listener surface_commit; + + uint32_t pending_move_resize_configure_serial; +}; + struct roots_xwayland_surface { struct roots_view *view; @@ -54,6 +70,7 @@ struct roots_xwayland_surface { enum roots_view_type { ROOTS_WL_SHELL_VIEW, ROOTS_XDG_SHELL_V6_VIEW, + ROOTS_XDG_SHELL_VIEW, #ifdef WLR_HAS_XWAYLAND ROOTS_XWAYLAND_VIEW, #endif @@ -90,6 +107,7 @@ struct roots_view { union { struct wlr_wl_shell_surface *wl_shell_surface; struct wlr_xdg_surface_v6 *xdg_surface_v6; + struct wlr_xdg_surface *xdg_surface; #ifdef WLR_HAS_XWAYLAND struct wlr_xwayland_surface *xwayland_surface; #endif @@ -97,6 +115,7 @@ struct roots_view { union { struct roots_wl_shell_surface *roots_wl_shell_surface; struct roots_xdg_surface_v6 *roots_xdg_surface_v6; + struct roots_xdg_surface *roots_xdg_surface; #ifdef WLR_HAS_XWAYLAND struct roots_xwayland_surface *roots_xwayland_surface; #endif @@ -154,6 +173,13 @@ struct roots_xdg_popup_v6 { struct wl_listener new_popup; }; +struct roots_xdg_popup { + struct roots_view_child view_child; + struct wlr_xdg_popup *wlr_popup; + struct wl_listener destroy; + struct wl_listener new_popup; +}; + 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); |