Skip to content

Commit d87b2fb

Browse files
committed
chore: format
1 parent 2bc6294 commit d87b2fb

2 files changed

Lines changed: 42 additions & 36 deletions

File tree

src/ipc_subscribe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include <fcntl.h>
44
#include <stdio.h>
55
#include <stdlib.h>
6+
#include <string.h>
67
#include <sys/stat.h>
78
#include <unistd.h>
8-
#include <string.h>
99

1010
static subscriber_t *make_subscriber(int client_fd, char *fifo_path, subscriber_mask_t mask,
1111
int count) {

src/scroller.c

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -504,56 +504,62 @@ bool scroller_focus_up(desktop_t *d) {
504504
}
505505

506506
void scroller_center_window(desktop_t *d, client_t *client) {
507-
scroller_state_t *s = d->scroller_state;
508-
if (!s || !client)
509-
return;
510-
511-
int col_idx, tile_idx;
512-
if (!find_tile(s, client, &col_idx, &tile_idx))
513-
return;
514-
515-
s->active_column_idx = col_idx;
516-
s->columns[col_idx].active_tile_idx = tile_idx;
517-
s->view_offset = 0.0;
518-
apply_active_focus(d);
519-
}
507+
scroller_state_t *s = d->scroller_state;
508+
if (!s || !client)
509+
return;
520510

521-
// ── Consume / Expel ────────────────────────────────────────────────────────
511+
int col_idx, tile_idx;
512+
if (!find_tile(s, client, &col_idx, &tile_idx))
513+
return;
514+
515+
s->active_column_idx = col_idx;
516+
s->columns[col_idx].active_tile_idx = tile_idx;
517+
s->view_offset = 0.0;
518+
apply_active_focus(d);
519+
}
522520

523521
bool scroller_consume_into_column(desktop_t *d) {
524-
scroller_state_t *s = d ? d->scroller_state : NULL;
525-
if (!s || s->column_count < 2) return false;
522+
scroller_state_t *s = d ? d->scroller_state : NULL;
523+
if (!s || s->column_count < 2)
524+
return false;
526525

527-
int col = s->active_column_idx;
528-
if (col == 0) return false;
526+
int col = s->active_column_idx;
527+
if (col == 0)
528+
return false;
529529

530-
scroller_column_t *src = &s->columns[col];
531-
if (src->tile_count == 0) return false;
530+
scroller_column_t *src = &s->columns[col];
531+
if (src->tile_count == 0)
532+
return false;
532533

533-
client_t *cl = src->tiles[src->active_tile_idx].client;
534-
if (!cl) return false;
534+
client_t *cl = src->tiles[src->active_tile_idx].client;
535+
if (!cl)
536+
return false;
535537

536-
scroller_remove_tile(s, cl, NULL);
538+
scroller_remove_tile(s, cl, NULL);
537539

538-
int target_col = col - 1;
539-
if (target_col >= s->column_count) return false;
540+
int target_col = col - 1;
541+
if (target_col >= s->column_count)
542+
return false;
540543

541-
return scroller_add_tile_to_column(s, cl, target_col, true);
544+
return scroller_add_tile_to_column(s, cl, target_col, true);
542545
}
543546

544547
bool scroller_expel_from_column(desktop_t *d) {
545-
scroller_state_t *s = d ? d->scroller_state : NULL;
546-
if (!s || s->column_count == 0) return false;
548+
scroller_state_t *s = d ? d->scroller_state : NULL;
549+
if (!s || s->column_count == 0)
550+
return false;
547551

548-
int col = s->active_column_idx;
549-
scroller_column_t *src = &s->columns[col];
550-
if (src->tile_count < 2) return false;
552+
int col = s->active_column_idx;
553+
scroller_column_t *src = &s->columns[col];
554+
if (src->tile_count < 2)
555+
return false;
551556

552-
client_t *cl = src->tiles[src->active_tile_idx].client;
553-
if (!cl) return false;
557+
client_t *cl = src->tiles[src->active_tile_idx].client;
558+
if (!cl)
559+
return false;
554560

555-
scroller_remove_tile(s, cl, NULL);
556-
return scroller_add_tile(s, cl, true);
561+
scroller_remove_tile(s, cl, NULL);
562+
return scroller_add_tile(s, cl, true);
557563
}
558564

559565
bool scroller_is_tiled(const client_t *c) {

0 commit comments

Comments
 (0)