@@ -504,56 +504,62 @@ bool scroller_focus_up(desktop_t *d) {
504504}
505505
506506void 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
523521bool 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
544547bool 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
559565bool scroller_is_tiled (const client_t * c ) {
0 commit comments