summaryrefslogtreecommitdiffstats
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 0ae042db..fcfb0b51 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -139,6 +139,14 @@ static void copy_pending_state(struct sway_container *container,
139 state->children = create_list(); 139 state->children = create_list();
140 list_cat(state->children, container->children); 140 list_cat(state->children, container->children);
141 } 141 }
142
143 struct sway_seat *seat = input_manager_current_seat(input_manager);
144 state->focused = seat_get_focus(seat) == container;
145
146 if (container->type != C_VIEW) {
147 state->focused_inactive_child =
148 seat_get_active_child(seat, container);
149 }
142} 150}
143 151
144static void transaction_add_container(struct sway_transaction *transaction, 152static void transaction_add_container(struct sway_transaction *transaction,
@@ -195,10 +203,12 @@ static void transaction_apply(struct sway_transaction *transaction) {
195 .width = instruction->state.swayc_width, 203 .width = instruction->state.swayc_width,
196 .height = instruction->state.swayc_height, 204 .height = instruction->state.swayc_height,
197 }; 205 };
198 for (int j = 0; j < root_container.children->length; ++j) { 206 for (int j = 0; j < root_container.current.children->length; ++j) {
199 struct sway_container *output = root_container.children->items[j]; 207 struct sway_container *output = root_container.current.children->items[j];
200 output_damage_box(output->sway_output, &old_box); 208 if (output->sway_output) {
201 output_damage_box(output->sway_output, &new_box); 209 output_damage_box(output->sway_output, &old_box);
210 output_damage_box(output->sway_output, &new_box);
211 }
202 } 212 }
203 213
204 // There are separate children lists for each instruction state, the 214 // There are separate children lists for each instruction state, the