diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/desktop.h | 5 | ||||
-rw-r--r-- | include/sway/tree/view.h | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/include/sway/desktop.h b/include/sway/desktop.h index 348fb187..c969a76b 100644 --- a/include/sway/desktop.h +++ b/include/sway/desktop.h | |||
@@ -1,8 +1,13 @@ | |||
1 | #include <wlr/types/wlr_surface.h> | 1 | #include <wlr/types/wlr_surface.h> |
2 | 2 | ||
3 | struct sway_container; | 3 | struct sway_container; |
4 | struct sway_view; | ||
4 | 5 | ||
5 | void desktop_damage_surface(struct wlr_surface *surface, double lx, double ly, | 6 | void desktop_damage_surface(struct wlr_surface *surface, double lx, double ly, |
6 | bool whole); | 7 | bool whole); |
7 | 8 | ||
8 | void desktop_damage_whole_container(struct sway_container *con); | 9 | void desktop_damage_whole_container(struct sway_container *con); |
10 | |||
11 | void desktop_damage_box(struct wlr_box *box); | ||
12 | |||
13 | void desktop_damage_view(struct sway_view *view); | ||
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 0e7f166c..2747e7c4 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -38,7 +38,6 @@ struct sway_view_impl { | |||
38 | const char *(*get_string_prop)(struct sway_view *view, | 38 | const char *(*get_string_prop)(struct sway_view *view, |
39 | enum sway_view_prop prop); | 39 | enum sway_view_prop prop); |
40 | uint32_t (*get_int_prop)(struct sway_view *view, enum sway_view_prop prop); | 40 | uint32_t (*get_int_prop)(struct sway_view *view, enum sway_view_prop prop); |
41 | void (*get_geometry)(struct sway_view *view, struct wlr_box *box); | ||
42 | uint32_t (*configure)(struct sway_view *view, double lx, double ly, | 41 | uint32_t (*configure)(struct sway_view *view, double lx, double ly, |
43 | int width, int height); | 42 | int width, int height); |
44 | void (*set_activated)(struct sway_view *view, bool activated); | 43 | void (*set_activated)(struct sway_view *view, bool activated); |
@@ -88,7 +87,14 @@ struct sway_view { | |||
88 | 87 | ||
89 | struct wlr_buffer *saved_buffer; | 88 | struct wlr_buffer *saved_buffer; |
90 | int saved_buffer_width, saved_buffer_height; | 89 | int saved_buffer_width, saved_buffer_height; |
91 | struct wlr_box saved_geometry; // The "old" geometry during a transaction | 90 | |
91 | // The geometry for whatever the client is committing, regardless of | ||
92 | // transaction state. Updated on every commit. | ||
93 | struct wlr_box geometry; | ||
94 | |||
95 | // The "old" geometry during a transaction. Used to damage the old location | ||
96 | // when a transaction is applied. | ||
97 | struct wlr_box saved_geometry; | ||
92 | 98 | ||
93 | bool destroying; | 99 | bool destroying; |
94 | 100 | ||
@@ -243,8 +249,6 @@ const char *view_get_shell(struct sway_view *view); | |||
243 | void view_get_constraints(struct sway_view *view, double *min_width, | 249 | void view_get_constraints(struct sway_view *view, double *min_width, |
244 | double *max_width, double *min_height, double *max_height); | 250 | double *max_width, double *min_height, double *max_height); |
245 | 251 | ||
246 | void view_get_geometry(struct sway_view *view, struct wlr_box *box); | ||
247 | |||
248 | uint32_t view_configure(struct sway_view *view, double lx, double ly, int width, | 252 | uint32_t view_configure(struct sway_view *view, double lx, double ly, int width, |
249 | int height); | 253 | int height); |
250 | 254 | ||
@@ -289,6 +293,8 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); | |||
289 | 293 | ||
290 | void view_unmap(struct sway_view *view); | 294 | void view_unmap(struct sway_view *view); |
291 | 295 | ||
296 | void view_update_size(struct sway_view *view, int width, int height); | ||
297 | |||
292 | void view_child_init(struct sway_view_child *child, | 298 | void view_child_init(struct sway_view_child *child, |
293 | const struct sway_view_child_impl *impl, struct sway_view *view, | 299 | const struct sway_view_child_impl *impl, struct sway_view *view, |
294 | struct wlr_surface *surface); | 300 | struct wlr_surface *surface); |