diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-17 11:04:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-17 11:04:34 -0500 |
commit | eda3bfeed5097c71634332bfe998188b028abf02 (patch) | |
tree | a5fb241142cf6815a8fce76eb9b5faf101d69ff9 /include | |
parent | Merge pull request #3143 from colemickens/grow (diff) | |
parent | Move view {x,y,width,height} into container struct (diff) | |
download | sway-eda3bfeed5097c71634332bfe998188b028abf02.tar.gz sway-eda3bfeed5097c71634332bfe998188b028abf02.tar.zst sway-eda3bfeed5097c71634332bfe998188b028abf02.zip |
Merge pull request #3142 from RyanDwyer/move-view-properties
Move view {x,y,width,height} into container struct
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/tree/container.h | 14 | ||||
-rw-r--r-- | include/sway/tree/view.h | 4 |
2 files changed, 8 insertions, 10 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index d3155eb3..f907aad2 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -41,8 +41,8 @@ enum wlr_direction; | |||
41 | struct sway_container_state { | 41 | struct sway_container_state { |
42 | // Container properties | 42 | // Container properties |
43 | enum sway_container_layout layout; | 43 | enum sway_container_layout layout; |
44 | double con_x, con_y; | 44 | double x, y; |
45 | double con_width, con_height; | 45 | double width, height; |
46 | 46 | ||
47 | bool is_fullscreen; | 47 | bool is_fullscreen; |
48 | 48 | ||
@@ -60,9 +60,8 @@ struct sway_container_state { | |||
60 | bool border_left; | 60 | bool border_left; |
61 | bool border_right; | 61 | bool border_right; |
62 | 62 | ||
63 | // View properties | 63 | double content_x, content_y; |
64 | double view_x, view_y; | 64 | double content_width, content_height; |
65 | double view_width, view_height; | ||
66 | }; | 65 | }; |
67 | 66 | ||
68 | struct sway_container { | 67 | struct sway_container { |
@@ -89,6 +88,9 @@ struct sway_container { | |||
89 | double saved_x, saved_y; | 88 | double saved_x, saved_y; |
90 | double saved_width, saved_height; | 89 | double saved_width, saved_height; |
91 | 90 | ||
91 | double content_x, content_y; | ||
92 | int content_width, content_height; | ||
93 | |||
92 | bool is_fullscreen; | 94 | bool is_fullscreen; |
93 | 95 | ||
94 | enum sway_container_border border; | 96 | enum sway_container_border border; |
@@ -210,7 +212,7 @@ void container_init_floating(struct sway_container *container); | |||
210 | 212 | ||
211 | void container_set_floating(struct sway_container *container, bool enable); | 213 | void container_set_floating(struct sway_container *container, bool enable); |
212 | 214 | ||
213 | void container_set_geometry_from_floating_view(struct sway_container *con); | 215 | void container_set_geometry_from_content(struct sway_container *con); |
214 | 216 | ||
215 | /** | 217 | /** |
216 | * Determine if the given container is itself floating. | 218 | * Determine if the given container is itself floating. |
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 4a8c3cb1..8f045c6a 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -67,10 +67,6 @@ struct sway_view { | |||
67 | 67 | ||
68 | pid_t pid; | 68 | pid_t pid; |
69 | 69 | ||
70 | // Geometry of the view itself (excludes borders) in layout coordinates | ||
71 | double x, y; | ||
72 | int width, height; | ||
73 | |||
74 | double saved_x, saved_y; | 70 | double saved_x, saved_y; |
75 | int saved_width, saved_height; | 71 | int saved_width, saved_height; |
76 | 72 | ||