aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-27 17:23:44 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-27 17:23:44 +1000
commit61c118768564eec07ac16494d90f567e75ea60cf (patch)
treeb870a53fdc6e25cac9ad9c3b0b5474ec1cf8503f /sway/desktop/transaction.c
parentRemove incorrect assertion and supporting code (diff)
downloadsway-61c118768564eec07ac16494d90f567e75ea60cf.tar.gz
sway-61c118768564eec07ac16494d90f567e75ea60cf.tar.zst
sway-61c118768564eec07ac16494d90f567e75ea60cf.zip
Fix nitpicks
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c10
1 files changed, 4 insertions, 6 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];