aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-12-06 14:28:59 -0500
committerKirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commitb38ed8b4792928dca3e1580e8160792ea41e25c4 (patch)
treeb080710c7a3f37de868ff4d5d96e6971f7105675 /include
parent08c484f46f130aa7e590ef4bcb39d2ceed7160f6 (diff)
scene_graph: Port xdg_shell
Diffstat (limited to 'include')
-rw-r--r--include/sway/scene_descriptor.h1
-rw-r--r--include/sway/tree/view.h46
2 files changed, 4 insertions, 43 deletions
diff --git a/include/sway/scene_descriptor.h b/include/sway/scene_descriptor.h
index 970adaa5..43991f77 100644
--- a/include/sway/scene_descriptor.h
+++ b/include/sway/scene_descriptor.h
@@ -16,6 +16,7 @@ enum sway_scene_descriptor_type {
SWAY_SCENE_DESC_CONTAINER,
SWAY_SCENE_DESC_VIEW,
SWAY_SCENE_DESC_LAYER_SHELL,
+ SWAY_SCENE_DESC_POPUP,
SWAY_SCENE_DESC_DRAG_ICON,
};
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 4aaed9e3..467d912f 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -123,8 +123,6 @@ struct sway_view {
struct wl_signal unmap;
} events;
- struct wl_listener surface_new_subsurface;
-
int max_render_time; // In milliseconds
enum seat_config_shortcuts_inhibit shortcuts_inhibit;
@@ -191,43 +189,12 @@ struct sway_xwayland_unmanaged {
struct wl_listener override_redirect;
};
#endif
-struct sway_view_child;
-
-struct sway_view_child_impl {
- void (*get_view_coords)(struct sway_view_child *child, int *sx, int *sy);
- void (*destroy)(struct sway_view_child *child);
-};
-
-/**
- * A view child is a surface in the view tree, such as a subsurface or a popup.
- */
-struct sway_view_child {
- const struct sway_view_child_impl *impl;
- struct wl_list link;
-
- struct sway_view *view;
- struct sway_view_child *parent;
- struct wl_list children; // sway_view_child::link
- struct wlr_surface *surface;
- bool mapped;
-
- struct wl_listener surface_commit;
- struct wl_listener surface_new_subsurface;
- struct wl_listener surface_map;
- struct wl_listener surface_unmap;
- struct wl_listener surface_destroy;
- struct wl_listener view_unmap;
-};
-
-struct sway_subsurface {
- struct sway_view_child child;
-
- struct wl_listener destroy;
-};
struct sway_xdg_popup {
- struct sway_view_child child;
+ struct sway_view *view;
+ struct wlr_scene_tree *scene_tree;
+ struct wlr_scene_tree *xdg_surface_tree;
struct wlr_xdg_popup *wlr_xdg_popup;
struct wl_listener surface_commit;
@@ -339,13 +306,6 @@ void view_unmap(struct sway_view *view);
void view_update_size(struct sway_view *view);
void view_center_surface(struct sway_view *view);
-void view_child_init(struct sway_view_child *child,
- const struct sway_view_child_impl *impl, struct sway_view *view,
- struct wlr_surface *surface);
-
-void view_child_destroy(struct sway_view_child *child);
-
-
struct sway_view *view_from_wlr_xdg_surface(
struct wlr_xdg_surface *xdg_surface);
#if HAVE_XWAYLAND