@@ -504,18 +504,56 @@ 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 ;
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+ }
510520
511- int col_idx , tile_idx ;
512- if (!find_tile (s , client , & col_idx , & tile_idx ))
513- return ;
521+ // ── Consume / Expel ────────────────────────────────────────────────────────
514522
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 );
523+ 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;
526+
527+ int col = s -> active_column_idx ;
528+ if (col == 0 ) return false;
529+
530+ scroller_column_t * src = & s -> columns [col ];
531+ if (src -> tile_count == 0 ) return false;
532+
533+ client_t * cl = src -> tiles [src -> active_tile_idx ].client ;
534+ if (!cl ) return false;
535+
536+ scroller_remove_tile (s , cl , NULL );
537+
538+ int target_col = col - 1 ;
539+ if (target_col >= s -> column_count ) return false;
540+
541+ return scroller_add_tile_to_column (s , cl , target_col , true);
542+ }
543+
544+ 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;
547+
548+ int col = s -> active_column_idx ;
549+ scroller_column_t * src = & s -> columns [col ];
550+ if (src -> tile_count < 2 ) return false;
551+
552+ client_t * cl = src -> tiles [src -> active_tile_idx ].client ;
553+ if (!cl ) return false;
554+
555+ scroller_remove_tile (s , cl , NULL );
556+ return scroller_add_tile (s , cl , true);
519557}
520558
521559bool scroller_is_tiled (const client_t * c ) {
0 commit comments