diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-06-30 06:27:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-30 06:27:39 -0700 |
commit | d8c61c976372eedf271f505ffd82c461b6503f6f (patch) | |
tree | 323739dc80680dd774acfdcf43eb76cfe93aa64c /include/sway/tree/view.h | |
parent | Merge pull request #2179 from atomnuker/master (diff) | |
parent | Merge remote-tracking branch 'upstream/master' into atomic (diff) | |
download | sway-d8c61c976372eedf271f505ffd82c461b6503f6f.tar.gz sway-d8c61c976372eedf271f505ffd82c461b6503f6f.tar.zst sway-d8c61c976372eedf271f505ffd82c461b6503f6f.zip |
Merge pull request #2072 from RyanDwyer/atomic
Atomic layout updates
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r-- | include/sway/tree/view.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 91865232..b99044d3 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -29,8 +29,8 @@ struct sway_view_impl { | |||
29 | const char *(*get_string_prop)(struct sway_view *view, | 29 | const char *(*get_string_prop)(struct sway_view *view, |
30 | enum sway_view_prop prop); | 30 | enum sway_view_prop prop); |
31 | uint32_t (*get_int_prop)(struct sway_view *view, enum sway_view_prop prop); | 31 | uint32_t (*get_int_prop)(struct sway_view *view, enum sway_view_prop prop); |
32 | void (*configure)(struct sway_view *view, double lx, double ly, int width, | 32 | uint32_t (*configure)(struct sway_view *view, double lx, double ly, |
33 | int height); | 33 | int width, int height); |
34 | void (*set_activated)(struct sway_view *view, bool activated); | 34 | void (*set_activated)(struct sway_view *view, bool activated); |
35 | void (*set_tiled)(struct sway_view *view, bool tiled); | 35 | void (*set_tiled)(struct sway_view *view, bool tiled); |
36 | void (*set_fullscreen)(struct sway_view *view, bool fullscreen); | 36 | void (*set_fullscreen)(struct sway_view *view, bool fullscreen); |
@@ -69,6 +69,8 @@ struct sway_view { | |||
69 | bool border_left; | 69 | bool border_left; |
70 | bool border_right; | 70 | bool border_right; |
71 | 71 | ||
72 | bool destroying; | ||
73 | |||
72 | list_t *executed_criteria; // struct criteria * | 74 | list_t *executed_criteria; // struct criteria * |
73 | list_t *marks; // char * | 75 | list_t *marks; // char * |
74 | 76 | ||
@@ -104,8 +106,6 @@ struct sway_xdg_shell_v6_view { | |||
104 | struct wl_listener map; | 106 | struct wl_listener map; |
105 | struct wl_listener unmap; | 107 | struct wl_listener unmap; |
106 | struct wl_listener destroy; | 108 | struct wl_listener destroy; |
107 | |||
108 | int pending_width, pending_height; | ||
109 | }; | 109 | }; |
110 | 110 | ||
111 | struct sway_xdg_shell_view { | 111 | struct sway_xdg_shell_view { |
@@ -120,8 +120,6 @@ struct sway_xdg_shell_view { | |||
120 | struct wl_listener map; | 120 | struct wl_listener map; |
121 | struct wl_listener unmap; | 121 | struct wl_listener unmap; |
122 | struct wl_listener destroy; | 122 | struct wl_listener destroy; |
123 | |||
124 | int pending_width, pending_height; | ||
125 | }; | 123 | }; |
126 | 124 | ||
127 | struct sway_xwayland_view { | 125 | struct sway_xwayland_view { |
@@ -139,9 +137,6 @@ struct sway_xwayland_view { | |||
139 | struct wl_listener map; | 137 | struct wl_listener map; |
140 | struct wl_listener unmap; | 138 | struct wl_listener unmap; |
141 | struct wl_listener destroy; | 139 | struct wl_listener destroy; |
142 | |||
143 | int pending_lx, pending_ly; | ||
144 | int pending_width, pending_height; | ||
145 | }; | 140 | }; |
146 | 141 | ||
147 | struct sway_xwayland_unmanaged { | 142 | struct sway_xwayland_unmanaged { |
@@ -213,10 +208,15 @@ uint32_t view_get_window_type(struct sway_view *view); | |||
213 | 208 | ||
214 | const char *view_get_shell(struct sway_view *view); | 209 | const char *view_get_shell(struct sway_view *view); |
215 | 210 | ||
216 | void view_configure(struct sway_view *view, double ox, double oy, int width, | 211 | uint32_t view_configure(struct sway_view *view, double lx, double ly, int width, |
217 | int height); | 212 | int height); |
218 | 213 | ||
219 | /** | 214 | /** |
215 | * Center the view in its workspace and build the swayc decorations around it. | ||
216 | */ | ||
217 | void view_init_floating(struct sway_view *view); | ||
218 | |||
219 | /** | ||
220 | * Configure the view's position and size based on the swayc's position and | 220 | * Configure the view's position and size based on the swayc's position and |
221 | * size, taking borders into consideration. | 221 | * size, taking borders into consideration. |
222 | */ | 222 | */ |
@@ -242,6 +242,8 @@ void view_for_each_surface(struct sway_view *view, | |||
242 | void view_init(struct sway_view *view, enum sway_view_type type, | 242 | void view_init(struct sway_view *view, enum sway_view_type type, |
243 | const struct sway_view_impl *impl); | 243 | const struct sway_view_impl *impl); |
244 | 244 | ||
245 | void view_free(struct sway_view *view); | ||
246 | |||
245 | void view_destroy(struct sway_view *view); | 247 | void view_destroy(struct sway_view *view); |
246 | 248 | ||
247 | void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); | 249 | void view_map(struct sway_view *view, struct wlr_surface *wlr_surface); |