Skip to content

Commit

Permalink
#164 send delta messages for all changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis committed Nov 10, 2024
1 parent 226e809 commit 9cdc06b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ void apply(void) {
struct zwlr_output_configuration_v1 *zwlr_config = zwlr_output_manager_v1_create_configuration(displ->zwlr_output_manager, displ->zwlr_output_manager_serial);
zwlr_output_configuration_v1_add_listener(zwlr_config, zwlr_output_configuration_listener(), displ);

struct SList *log_cap_lines = NULL;

log_cap_lines_start(&log_cap_lines);

if ((head_changing_mode = slist_find_val(heads, head_current_mode_not_desired))) {

print_head(INFO, DELTA, head_changing_mode);
Expand All @@ -299,17 +303,8 @@ void apply(void) {

} else {

struct SList *log_cap_lines = NULL;

log_cap_lines_start(&log_cap_lines);

print_heads(INFO, DELTA, heads);

// TODO unique file passed to the user
log_cap_lines_stop(&log_cap_lines);
log_cap_lines_write(&log_cap_lines, "/tmp/wd.delta");
log_cap_lines_free(&log_cap_lines);

// all changes except mode
for (i = heads_changing; i; i = i->nex) {
struct Head *head = (struct Head*)i->val;
Expand All @@ -325,6 +320,11 @@ void apply(void) {
}
}

// TODO unique file passed to the user
log_cap_lines_stop(&log_cap_lines);
log_cap_lines_write(&log_cap_lines, "/tmp/wd.delta");
log_cap_lines_free(&log_cap_lines);

zwlr_output_configuration_v1_apply(zwlr_config);

displ->config_state = OUTSTANDING;
Expand Down

0 comments on commit 9cdc06b

Please sign in to comment.