diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-27 17:23:44 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-27 17:23:44 +1000 |
commit | 61c118768564eec07ac16494d90f567e75ea60cf (patch) | |
tree | b870a53fdc6e25cac9ad9c3b0b5474ec1cf8503f | |
parent | Remove incorrect assertion and supporting code (diff) | |
download | sway-61c118768564eec07ac16494d90f567e75ea60cf.tar.gz sway-61c118768564eec07ac16494d90f567e75ea60cf.tar.zst sway-61c118768564eec07ac16494d90f567e75ea60cf.zip |
Fix nitpicks
-rw-r--r-- | sway/desktop/transaction.c | 10 | ||||
-rw-r--r-- | sway/tree/container.c | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 7a99bfe2..98cde889 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c | |||
@@ -73,8 +73,7 @@ static void save_view_buffer(struct sway_view *view, | |||
73 | remove_saved_view_buffer(instruction); | 73 | remove_saved_view_buffer(instruction); |
74 | } | 74 | } |
75 | if (view->surface && wlr_surface_has_buffer(view->surface)) { | 75 | if (view->surface && wlr_surface_has_buffer(view->surface)) { |
76 | wlr_buffer_ref(view->surface->buffer); | 76 | instruction->saved_buffer = wlr_buffer_ref(view->surface->buffer); |
77 | instruction->saved_buffer = view->surface->buffer; | ||
78 | } | 77 | } |
79 | } | 78 | } |
80 | 79 | ||
@@ -198,12 +197,11 @@ static void transaction_apply(struct sway_transaction *transaction) { | |||
198 | (now.tv_nsec - commit->tv_nsec) / 1000000.0; | 197 | (now.tv_nsec - commit->tv_nsec) / 1000000.0; |
199 | float ms_total = ms_arranging + ms_waiting; | 198 | float ms_total = ms_arranging + ms_waiting; |
200 | wlr_log(L_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, " | 199 | wlr_log(L_DEBUG, "Transaction %p: %.1fms arranging, %.1fms waiting, " |
201 | "%.1fms total (%.1f frames if 60hz)", transaction, | 200 | "%.1fms total (%.1f frames if 60Hz)", transaction, |
202 | ms_arranging, ms_waiting, ms_total, ms_total / (1000 / 60)); | 201 | ms_arranging, ms_waiting, ms_total, ms_total / (1000 / 60)); |
203 | } | 202 | } |
204 | int i; | ||
205 | // Apply the instruction state to the container's current state | 203 | // Apply the instruction state to the container's current state |
206 | for (i = 0; i < transaction->instructions->length; ++i) { | 204 | for (int i = 0; i < transaction->instructions->length; ++i) { |
207 | struct sway_transaction_instruction *instruction = | 205 | struct sway_transaction_instruction *instruction = |
208 | transaction->instructions->items[i]; | 206 | transaction->instructions->items[i]; |
209 | struct sway_container *container = instruction->container; | 207 | struct sway_container *container = instruction->container; |
@@ -220,7 +218,7 @@ static void transaction_apply(struct sway_transaction *transaction) { | |||
220 | } | 218 | } |
221 | 219 | ||
222 | // Apply damage | 220 | // Apply damage |
223 | for (i = 0; i < transaction->damage->length; ++i) { | 221 | for (int i = 0; i < transaction->damage->length; ++i) { |
224 | struct wlr_box *box = transaction->damage->items[i]; | 222 | struct wlr_box *box = transaction->damage->items[i]; |
225 | for (int j = 0; j < root_container.children->length; ++j) { | 223 | for (int j = 0; j < root_container.children->length; ++j) { |
226 | struct sway_container *output = root_container.children->items[j]; | 224 | struct sway_container *output = root_container.children->items[j]; |
diff --git a/sway/tree/container.c b/sway/tree/container.c index 2b9eb636..8446c457 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -296,7 +296,8 @@ static struct sway_container *container_output_destroy( | |||
296 | /** | 296 | /** |
297 | * Implement the actual destroy logic, without reaping. | 297 | * Implement the actual destroy logic, without reaping. |
298 | */ | 298 | */ |
299 | struct sway_container *container_destroy_noreaping(struct sway_container *con) { | 299 | static struct sway_container *container_destroy_noreaping( |
300 | struct sway_container *con) { | ||
300 | if (con == NULL) { | 301 | if (con == NULL) { |
301 | return NULL; | 302 | return NULL; |
302 | } | 303 | } |