diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-23 16:24:11 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-23 16:24:11 +1000 |
commit | 38398e2d77d57dc06b67ec88a54091c897915602 (patch) | |
tree | c80935807865fd96ab7d037070287d4dfaba1863 /include/sway/tree/view.h | |
parent | Preserve buffers during transactions (diff) | |
download | sway-38398e2d77d57dc06b67ec88a54091c897915602.tar.gz sway-38398e2d77d57dc06b67ec88a54091c897915602.tar.zst sway-38398e2d77d57dc06b67ec88a54091c897915602.zip |
Implement atomic layout updates for tree operations
This implements atomic layout updates for when views map, reparent or
unmap.
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r-- | include/sway/tree/view.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index fc4c8df9..5a615b43 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -37,7 +37,7 @@ struct sway_view_impl { | |||
37 | void (*for_each_surface)(struct sway_view *view, | 37 | void (*for_each_surface)(struct sway_view *view, |
38 | wlr_surface_iterator_func_t iterator, void *user_data); | 38 | wlr_surface_iterator_func_t iterator, void *user_data); |
39 | void (*close)(struct sway_view *view); | 39 | void (*close)(struct sway_view *view); |
40 | void (*destroy)(struct sway_view *view); | 40 | void (*free)(struct sway_view *view); |
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct sway_view { | 43 | struct sway_view { |
@@ -68,15 +68,10 @@ struct sway_view { | |||
68 | bool border_left; | 68 | bool border_left; |
69 | bool border_right; | 69 | bool border_right; |
70 | 70 | ||
71 | bool destroying; | ||
72 | |||
71 | list_t *executed_criteria; // struct criteria * | 73 | list_t *executed_criteria; // struct criteria * |
72 | list_t *marks; // char * | 74 | list_t *marks; // char * |
73 | list_t *instructions; // struct sway_transaction_instruction * | ||
74 | |||
75 | // If saved_buffer is set, the main surface of the view will render this | ||
76 | // buffer/texture instead of its own. This is used while waiting for | ||
77 | // transactions to complete. | ||
78 | struct wlr_buffer *saved_buffer; | ||
79 | int saved_surface_width, saved_surface_height; | ||
80 | 75 | ||
81 | struct wlr_texture *marks_focused; | 76 | struct wlr_texture *marks_focused; |
82 | struct wlr_texture *marks_focused_inactive; | 77 | struct wlr_texture *marks_focused_inactive; |
@@ -244,11 +239,16 @@ void view_for_each_surface(struct sway_view *view, | |||
244 | void view_init(struct sway_view *view, enum sway_view_type type, | 239 | void view_init(struct sway_view *view, enum sway_view_type type, |
245 | const struct sway_view_impl *impl); | 240 | const struct sway_view_impl *impl); |
246 | 241 | ||
242 | void view_free(struct sway_view *view); | ||
243 | |||
247 | void view_destroy(struct sway_view *view); | 244 | void view_destroy(struct sway_view *view); |
248 | 245 | ||
249 | void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); | 246 | void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); |
250 | 247 | ||
251 | void view_unmap(struct sway_view *view); | 248 | /** |
249 | * Unmap the view and return the surviving parent (after reaping). | ||
250 | */ | ||
251 | struct sway_container *view_unmap(struct sway_view *view); | ||
252 | 252 | ||
253 | void view_update_position(struct sway_view *view, double lx, double ly); | 253 | void view_update_position(struct sway_view *view, double lx, double ly); |
254 | 254 | ||