diff options
author | emersion <contact@emersion.fr> | 2018-05-13 16:38:56 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-05-13 16:38:56 +0100 |
commit | 88d9d43b367b9b0cb61c4c9fb1619becdb71e9d6 (patch) | |
tree | 20597fec9184cbad25711a0f0cd7c028e99d2e78 /include/sway | |
parent | 0c96d757d0d5d1762390dd119cbe344e8781c19f (diff) |
Add xdg-shell stable support
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/server.h | 5 | ||||
-rw-r--r-- | include/sway/tree/view.h | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/include/sway/server.h b/include/sway/server.h index 296fbf22..071135ca 100644 --- a/include/sway/server.h +++ b/include/sway/server.h @@ -8,6 +8,7 @@ #include <wlr/types/wlr_data_device.h> #include <wlr/types/wlr_layer_shell.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 <wlr/xwayland.h> @@ -32,6 +33,9 @@ struct sway_server { struct wlr_xdg_shell_v6 *xdg_shell_v6; struct wl_listener xdg_shell_v6_surface; + struct wlr_xdg_shell *xdg_shell; + struct wl_listener xdg_shell_surface; + struct wlr_xwayland *xwayland; struct wlr_xcursor_manager *xcursor_manager; struct wl_listener xwayland_surface; @@ -51,6 +55,7 @@ void handle_new_output(struct wl_listener *listener, void *data); void handle_layer_shell_surface(struct wl_listener *listener, void *data); 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_xwayland_surface(struct wl_listener *listener, void *data); void handle_wl_shell_surface(struct wl_listener *listener, void *data); diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 8091fe0c..17e579c8 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -12,6 +12,7 @@ struct sway_container; enum sway_view_type { SWAY_VIEW_WL_SHELL, SWAY_VIEW_XDG_SHELL_V6, + SWAY_VIEW_XDG_SHELL, SWAY_VIEW_XWAYLAND, }; @@ -54,6 +55,7 @@ struct sway_view { union { struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; + struct wlr_xdg_surface *wlr_xdg_surface; struct wlr_xwayland_surface *wlr_xwayland_surface; struct wlr_wl_shell_surface *wlr_wl_shell_surface; }; @@ -82,6 +84,22 @@ struct sway_xdg_shell_v6_view { int pending_width, pending_height; }; +struct sway_xdg_shell_view { + struct sway_view view; + + struct wl_listener commit; + struct wl_listener request_move; + struct wl_listener request_resize; + struct wl_listener request_maximize; + struct wl_listener request_fullscreen; + struct wl_listener new_popup; + struct wl_listener map; + struct wl_listener unmap; + struct wl_listener destroy; + + int pending_width, pending_height; +}; + struct sway_xwayland_view { struct sway_view view; @@ -156,6 +174,15 @@ struct sway_xdg_popup_v6 { struct wl_listener destroy; }; +struct sway_xdg_popup { + struct sway_view_child child; + + struct wlr_xdg_surface *wlr_xdg_surface; + + struct wl_listener new_popup; + struct wl_listener destroy; +}; + const char *view_get_title(struct sway_view *view); const char *view_get_app_id(struct sway_view *view); |