diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-04-27 10:25:40 +0200 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-18 18:36:54 +0300 |
commit | 06ad734e70227ad0527fe11b88ad37e93005ce0c (patch) | |
tree | 5a5e2606242e3d229f4979d2b7c5352a139730b0 /include/sway/tree/view.h | |
parent | xwayland: Cleanup geometry handling on commit (diff) | |
download | sway-06ad734e70227ad0527fe11b88ad37e93005ce0c.tar.gz sway-06ad734e70227ad0527fe11b88ad37e93005ce0c.tar.zst sway-06ad734e70227ad0527fe11b88ad37e93005ce0c.zip |
scene_graph: Port view saved buffers
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r-- | include/sway/tree/view.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 8493958e..66d6db1c 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -57,21 +57,13 @@ struct sway_view_impl { | |||
57 | void (*destroy)(struct sway_view *view); | 57 | void (*destroy)(struct sway_view *view); |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct sway_saved_buffer { | ||
61 | struct wlr_client_buffer *buffer; | ||
62 | int x, y; | ||
63 | int width, height; | ||
64 | enum wl_output_transform transform; | ||
65 | struct wlr_fbox source_box; | ||
66 | struct wl_list link; // sway_view::saved_buffers | ||
67 | }; | ||
68 | |||
69 | struct sway_view { | 60 | struct sway_view { |
70 | enum sway_view_type type; | 61 | enum sway_view_type type; |
71 | const struct sway_view_impl *impl; | 62 | const struct sway_view_impl *impl; |
72 | 63 | ||
73 | struct wlr_scene_tree *scene_tree; | 64 | struct wlr_scene_tree *scene_tree; |
74 | struct wlr_scene_tree *content_tree; | 65 | struct wlr_scene_tree *content_tree; |
66 | struct wlr_scene_tree *saved_surface_tree; | ||
75 | 67 | ||
76 | struct sway_container *container; // NULL if unmapped and transactions finished | 68 | struct sway_container *container; // NULL if unmapped and transactions finished |
77 | struct wlr_surface *surface; // NULL for unmapped views | 69 | struct wlr_surface *surface; // NULL for unmapped views |
@@ -92,16 +84,10 @@ struct sway_view { | |||
92 | bool allow_request_urgent; | 84 | bool allow_request_urgent; |
93 | struct wl_event_source *urgent_timer; | 85 | struct wl_event_source *urgent_timer; |
94 | 86 | ||
95 | struct wl_list saved_buffers; // sway_saved_buffer::link | ||
96 | |||
97 | // The geometry for whatever the client is committing, regardless of | 87 | // The geometry for whatever the client is committing, regardless of |
98 | // transaction state. Updated on every commit. | 88 | // transaction state. Updated on every commit. |
99 | struct wlr_box geometry; | 89 | struct wlr_box geometry; |
100 | 90 | ||
101 | // The "old" geometry during a transaction. Used to damage the old location | ||
102 | // when a transaction is applied. | ||
103 | struct wlr_box saved_geometry; | ||
104 | |||
105 | struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel; | 91 | struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel; |
106 | struct wl_listener foreign_activate_request; | 92 | struct wl_listener foreign_activate_request; |
107 | struct wl_listener foreign_fullscreen_request; | 93 | struct wl_listener foreign_fullscreen_request; |
@@ -347,4 +333,6 @@ bool view_is_transient_for(struct sway_view *child, struct sway_view *ancestor); | |||
347 | 333 | ||
348 | void view_assign_ctx(struct sway_view *view, struct launcher_ctx *ctx); | 334 | void view_assign_ctx(struct sway_view *view, struct launcher_ctx *ctx); |
349 | 335 | ||
336 | void view_send_frame_done(struct sway_view *view); | ||
337 | |||
350 | #endif | 338 | #endif |