@@ -515,7 +515,6 @@ bool tiling_managed_add(WTiling *ws, WRegion *reg)
515515bool tiling_do_attach_initial (WTiling * ws , WRegion * reg )
516516{
517517 assert (ws -> split_tree == NULL );
518- fprintf (stderr , "tiling_do_attach_initial\n" );
519518
520519 ws -> split_tree = (WSplit * )create_splitregion (& REGION_GEOM (reg ), reg );
521520 if (ws -> split_tree == NULL )
@@ -543,7 +542,6 @@ bool tiling_init(WTiling *ws, WWindow *parent, const WFitParams *fp,
543542 WRegionSimpleCreateFn * create_frame_fn , bool ci )
544543{
545544 const char * p [1 ];
546- fprintf (stderr , "tiling_init\n" );
547545
548546 ws -> split_tree = NULL ;
549547 ws -> create_frame_fn = (create_frame_fn
@@ -594,7 +592,6 @@ bool tiling_init(WTiling *ws, WWindow *parent, const WFitParams *fp,
594592
595593 region_register (& (ws -> reg ));
596594 region_add_bindmap ((WRegion * )ws , mod_tiling_tiling_bindmap );
597- fprintf (stderr , "tiling_initted\n" );
598595
599596 return TRUE;
600597}
@@ -702,34 +699,12 @@ void tiling_managed_remove(WTiling *ws, WRegion *reg)
702699 if (node == (WSplitRegion * )(ws -> stdispnode ))
703700 ws -> stdispnode = NULL ;
704701
705- if (node != NULL ){
706- bool reused = FALSE ;
702+ if (node != NULL )
703+ splittree_remove (( WSplit * ) node , (! norestore && other != NULL )) ;
707704
708- if (other == NULL && !norestore ){
709- WWindow * par = REGION_PARENT (ws );
710- WFitParams fp ;
711-
712- assert (par != NULL );
713-
714- fp .g = node -> split .geom ;
715- fp .mode = REGION_FIT_EXACT ;
716-
717- other = (ws -> create_frame_fn )(par , & fp );
718-
719- if (other != NULL ){
720- node -> reg = other ;
721- tiling_managed_add (ws , other );
722- reused = TRUE;
723- }else {
724- warn (TR ("Tiling in useless state." ));
725- }
726- }
727-
728- if (!reused )
729- splittree_remove ((WSplit * )node , (!norestore && other != NULL ));
730- }
731-
732- if (!norestore && other != NULL && act && mcf )
705+ if (other == NULL )
706+ destroy_obj ((Obj * )ws );
707+ else if (!norestore && act && mcf )
733708 region_warp (other );
734709}
735710
@@ -1082,20 +1057,13 @@ void do_unsplit(WRegion *reg)
10821057 if (ws == NULL )
10831058 return ;
10841059
1085- fprintf (stderr , "unsplitting %s at %x\n" , OBJ_TYPESTR (reg ), reg );
1086-
10871060 ph = region_get_rescue_pholder_for ((WRegion * )ws , reg );
10881061
10891062 if (ph == NULL ){
1090- fprintf (stderr , "no rescue needed?\n" );
10911063 res = !region_rescue_needed (reg );
1092- fprintf (stderr , "res %d\n" , res );
10931064 }else {
1094- fprintf (stderr , "rescueing\n" );
10951065 res = region_rescue (reg , ph );
1096- fprintf (stderr , "rescued, destroying ph\n" );
10971066 destroy_obj ((Obj * )ph );
1098- fprintf (stderr , "destroyed ph\n" );
10991067 }
11001068
11011069 if (!res ){
@@ -1104,9 +1072,7 @@ void do_unsplit(WRegion *reg)
11041072 return ;
11051073 }
11061074
1107- fprintf (stderr , "destroying %x\n" , reg );
11081075 destroy_obj ((Obj * )reg );
1109- fprintf (stderr , "end do_unsplit\n" );
11101076}
11111077
11121078
@@ -1679,7 +1645,6 @@ WRegion *tiling_load(WWindow *par, const WFitParams *fp, ExtlTab tab)
16791645 ws -> split_tree = tiling_load_node (ws , & REGION_GEOM (ws ), treetab );
16801646 extl_unref_table (treetab );
16811647 }
1682- fprintf (stderr , "loaded node\n" );
16831648
16841649 if (ws -> split_tree == NULL ){
16851650 warn (TR ("The workspace is empty." ));
@@ -1690,7 +1655,6 @@ WRegion *tiling_load(WWindow *par, const WFitParams *fp, ExtlTab tab)
16901655 ws -> split_tree -> ws_if_root = ws ;
16911656 split_restack (ws -> split_tree , ws -> dummywin , Above );
16921657
1693- fprintf (stderr , "restacked\n" );
16941658 return (WRegion * )ws ;
16951659}
16961660
0 commit comments